How do I get a list of all the tables in Entity Framework Core in a db context?
The following answer is for previous version in Entity Framework 5, we are currently using EF Core 3.
how to get a list of all entities in EF 5?
Entity Framework - Get List of Tables
var tableNames = context.MetadataWorkspace.GetItems(DataSpace.SSpace)
.Select(t => t.Name)
.ToList();
We just want to display all the database in a report with EF Core. Raw Sql is select * from sys.tables or information_schema.tables
, however looking for EFCore way