private static List <FieldType> CreateEntityFields(IEdmModel edmModel, OeGraphTypeBuilder graphTypeBuilder) { Db.OeDataAdapter dataAdapter = edmModel.GetDataAdapter(edmModel.EntityContainer); var entityFields = new List <FieldType>(dataAdapter.EntitySetAdapters.Count); foreach (Db.OeEntitySetAdapter entitySetAdapter in dataAdapter.EntitySetAdapters) { FieldType entityField = new FieldType() { Name = entitySetAdapter.EntitySetName, Resolver = new OeEntitySetResolver(edmModel), ResolvedType = graphTypeBuilder.CreateListGraphType(entitySetAdapter.EntityType) }; entityFields.Add(entityField); } return(entityFields); }
public OeSchemaBuilder(Db.OeDataAdapter dataAdapter, IEdmModel edmModel, ModelBuilder.OeEdmModelMetadataProvider modelMetadataProvider) { _dataAdapter = dataAdapter; _edmModel = edmModel; _graphTypeBuilder = new OeGraphTypeBuilder(modelMetadataProvider); }
public OeSchemaBuilder(IEdmModel edmModel) { _edmModel = edmModel; _graphTypeBuilder = new OeGraphTypeBuilder(edmModel); }