Esempio n. 1
0
        public static EF6Model CreateWithStaticMapping(ContentAccess contentAccess, SqlConnection connection, bool contextOwnsConnection)
        {
            var schemaProvider = new StaticSchemaProvider();
            var configurator   = new MappingConfigurator(contentAccess, schemaProvider);

            return(Create(configurator, connection, contextOwnsConnection));
        }
Esempio n. 2
0
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            var schemaProvider = new StaticSchemaProvider();
            var mapping        = new MappingConfigurator(DefaultContentAccess, schemaProvider);

            mapping.OnModelCreating(modelBuilder);
        }
Esempio n. 3
0
        private IMappingResolver GetDefaultMappingResolver()
        {
            var schema = new StaticSchemaProvider();

            return(new MappingResolver(schema.GetSchema()));
        }