コード例 #1
0
        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);
        }
コード例 #2
0
 public OeSchemaBuilder(Db.OeDataAdapter dataAdapter, IEdmModel edmModel, ModelBuilder.OeEdmModelMetadataProvider modelMetadataProvider)
 {
     _dataAdapter      = dataAdapter;
     _edmModel         = edmModel;
     _graphTypeBuilder = new OeGraphTypeBuilder(modelMetadataProvider);
 }
コード例 #3
0
 public OeSchemaBuilder(IEdmModel edmModel)
 {
     _edmModel         = edmModel;
     _graphTypeBuilder = new OeGraphTypeBuilder(edmModel);
 }