public static EntityTypeInfo GetEntityType(int id) { EntityTypeInfo ret = null; using (EntityMetadataContext ctx = EntityMetadataContext.CreateInstance()) { ret = ctx.GetEntityType(id); } return(ret); }
public static EntityPropertyInfo GetEntityProperty(int id, bool throwIfNull) { EntityPropertyInfo ret = null; using (EntityMetadataContext ctx = EntityMetadataContext.CreateInstance()) { ret = ctx.GetEntityProperty(id); } if ((ret == null) && throwIfNull) { //TODO: throw } return(ret); }