如何列出实体集在运行时具有的属性?
答案 0 :(得分:4)
我找到了答案链接。答案是
EntitySetBase es = container.BaseEntitySets.OfType<EntitySet>()
.Where( eb=>eb.ElementType.Name ==s).FirstOrDefault();
foreach (EdmMember memberinfo in es.ElementType.Members.Where(m=>m.BuiltInTypeKind == BuiltInTypeKind.EdmProperty) )