Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何列出实体集在运行时具有的属性?
我找到了答案链接。答案是
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) )