Entity Framwork 获取EDM中的实体名
using (DemoEntities context = new DemoEntities ()) { var entityName = context.MetadataWorkspace.GetEntityContainer(context.DefaultContainerName, DataSpace.CSpace).BaseEntitySets; foreach (var name in entityName) { Console.WriteLine("entity name : {0}", name.Name); } }