Esempio n. 1
0
        /// <summary>
        ///     Call this method from the constructor of a class derived from <see cref="DbConfiguration" /> to set
        ///     an implementation of <see cref="IDbProviderFactoryService" /> which allows a <see cref="DbProviderFactory" />
        ///     to be obtained from a <see cref="DbConnection" /> in cases where the default implementation is not
        ///     sufficient.
        /// </summary>
        /// <remarks>
        ///     This method is provided as a convenient and discoverable way to add configuration to the entity framework.
        ///     Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
        ///     <see cref="IDbProviderFactoryService" />. This means that, if desired, the same functionality can be achieved using
        ///     a custom resolver or a resolved backed by an Inversion-of-Control container.
        /// </remarks>
        /// <param name="providerFactoryService"> The provider factory service. </param>
        protected internal void SetProviderFactoryService(IDbProviderFactoryService providerFactoryService)
        {
            Check.NotNull(providerFactoryService, "providerFactoryService");

            _internalConfiguration.CheckNotLocked("SetProviderFactoryService");
            _internalConfiguration.RegisterSingleton(providerFactoryService, null);
        }
 public FakeProviderFactoryService(IDbProviderFactoryService originalProviderFactoryService)
 {
     _originalProviderFactoryService = originalProviderFactoryService;
 }
Esempio n. 3
0
 public FakeProviderFactoryService(IDbProviderFactoryService originalProviderFactoryService)
 {
     _originalProviderFactoryService = originalProviderFactoryService;
 }
 public GlimpseDbProviderFactoryService(IDbProviderFactoryService innerFactoryService)
 {
     this.innerFactoryService = innerFactoryService;
 }
Esempio n. 5
0
 public GlimpseDbProviderFactoryService(IDbProviderFactoryService innerFactoryService)
 {
     this.innerFactoryService = innerFactoryService;
 }