protected override void RegisterTypes(IUnityContainer container) { base.RegisterTypes(container); var config = new EntityObjectStoreConfiguration { EnforceProxies = false }; config.UsingCodeFirstContext(() => new PolymorphicNavigationContext(databaseName)); container.RegisterInstance<IEntityObjectStoreConfiguration>(config, (new ContainerControlledLifetimeManager())); container.RegisterType<IMenuFactory, ReflectorTest.NullMenuFactory>(); }
public static EntityObjectStoreConfiguration EntityObjectStoreConfig() { CodeFirstContext.Seed("RestTest"); var config = new EntityObjectStoreConfiguration(); config.UsingCodeFirstContext(() => new CodeFirstContext("RestTest")); return config; }
public EntityContextConfigurator(EntityObjectStoreConfiguration entityObjectStoreConfiguration, string contextName) : this(entityObjectStoreConfiguration) { this.contextName = contextName; if (!entityObjectStoreConfiguration.NamedContextTypes.ContainsKey(contextName)) { entityObjectStoreConfiguration.NamedContextTypes.Add(contextName, () => new Type[] {}); } }
protected override void RegisterTypes(IUnityContainer container) { base.RegisterTypes(container); var config = new EntityObjectStoreConfiguration {EnforceProxies = false}; config.UsingCodeFirstContext(() => new MvcTestContext("SystemHelperTest")); container.RegisterInstance<IEntityObjectStoreConfiguration>(config, (new ContainerControlledLifetimeManager())); container.RegisterType<IFrameworkFacade, FrameworkFacade>(new PerResolveLifetimeManager()); container.RegisterType<IOidStrategy, EntityOidStrategy>(new PerResolveLifetimeManager()); container.RegisterType<IMessageBroker, MessageBroker>(new PerResolveLifetimeManager()); container.RegisterType<IOidTranslator, OidTranslatorSemiColonSeparatedList>(new PerResolveLifetimeManager()); }
public static EntityObjectStoreConfiguration EntityObjectStoreConfig() { var config = new EntityObjectStoreConfiguration(); config.UsingCodeFirstContext(() => new AdventureWorksContext()); return config; }
public EntityContextConfigurator(EntityObjectStoreConfiguration entityObjectStoreConfiguration, string contextName) : this(entityObjectStoreConfiguration) { this.contextName = contextName; if (!entityObjectStoreConfiguration.NamedContextTypes.ContainsKey(contextName)) { entityObjectStoreConfiguration.NamedContextTypes.Add(contextName, () => new Type[] {}); } }
public EntityContextConfigurator(EntityObjectStoreConfiguration entityObjectStoreConfiguration, Func<DbContext> f) : this(entityObjectStoreConfiguration) { entityObjectStoreConfiguration.DbContextConstructors.Add(new Tuple<Func<DbContext>, Func<Type[]>>(f, () => new Type[] {})); contextIndex = entityObjectStoreConfiguration.DbContextConstructors.Count() - 1; }
private EntityContextConfigurator(EntityObjectStoreConfiguration entityObjectStoreConfiguration) { this.entityObjectStoreConfiguration = entityObjectStoreConfiguration; }
public static EntityObjectStoreConfiguration EntityObjectStoreConfig() { var config = new EntityObjectStoreConfiguration(); config.UsingCodeFirstContext(() => new ExampleDbContext("NakedObjectsExample")); return config; }
protected override void RegisterTypes(IUnityContainer container) { base.RegisterTypes(container); // replace INakedObjectStore types var c = new EntityObjectStoreConfiguration(); c.UsingCodeFirstContext(() => new TestContext("TestContext")); container.RegisterInstance<IEntityObjectStoreConfiguration>(c, (new ContainerControlledLifetimeManager())); var types = new[] {typeof (TestDomainObject[]), typeof (List<TestDomainObject>), typeof (ObjectQuery<TestDomainObject>), typeof (List<Int32>)}; var ms = new[] {typeof (SimpleRepository<TestDomainObject>)}; var ns = new[] {typeof (TestDomainObject).Namespace}; var rc = new ReflectorConfiguration(types, ms, ns); container.RegisterInstance<IReflectorConfiguration>(rc, (new ContainerControlledLifetimeManager())); }
public EntityContextConfigurator(EntityObjectStoreConfiguration entityObjectStoreConfiguration, Func <DbContext> f) : this(entityObjectStoreConfiguration) { entityObjectStoreConfiguration.DbContextConstructors.Add(new Tuple <Func <DbContext>, Func <Type[]> >(f, () => new Type[] {})); contextIndex = entityObjectStoreConfiguration.DbContextConstructors.Count() - 1; }
private EntityContextConfigurator(EntityObjectStoreConfiguration entityObjectStoreConfiguration) { this.entityObjectStoreConfiguration = entityObjectStoreConfiguration; }
public static EntityObjectStoreConfiguration EntityObjectStoreConfig() { var config = new EntityObjectStoreConfiguration(); config.UsingCodeFirstContext(() => new AdventureWorksContext()); config.SpecifyTypesNotAssociatedWithAnyContext(() => new[] { typeof(PropertyViewModel), typeof(FindViewModel) }); return config; }
protected override void RegisterTypes(IUnityContainer container) { base.RegisterTypes(container); var config = new EntityObjectStoreConfiguration {EnforceProxies = false}; config.UsingCodeFirstContext(() => new MvcTestContext("EncryptionTest")); container.RegisterInstance<IEntityObjectStoreConfiguration>(config, (new ContainerControlledLifetimeManager())); }
public static EntityObjectStoreConfiguration EntityObjectStoreConfig() { var config = new EntityObjectStoreConfiguration(); config.UsingEdmxContext("Model").AssociateTypes(AllPersistedTypesInMainModel); config.SpecifyTypesNotAssociatedWithAnyContext(() => new[] {typeof (AWDomainObject)}); return config; }