 <p>Try this out, it seems to not complain about it, but don't have the full setup to test it out.</p> <pre><code>void ShowTableInDataGrid(System.Data.Entity.Core.Metadata.Edm.EntityType myEntityType) { var tableName = myEntityType.GetType(); var result = _context.Database. SqlQuery&lt;myEntityType.GetType()&gt; ("SELECT * FROM dbo." + tableName).ToList(); DataGridMain.ItemsSource = result; } </code></pre>