Exemple #1
0
        public void CanCreate()
        {
            var options = new PgsqlDapperServiceOptions();

            Assert.IsNotNull(options);
            Assert.IsNotNull(options.ConnectionFactory);
        }
Exemple #2
0
 /// <summary>   Provide service. </summary>
 /// <param name="configuration">    The configuration. </param>
 /// <param name="provider">         The provider. </param>
 /// <returns>   A TDataService. </returns>
 internal static TDataService ProvideService <TDataService>(IConfigurationRoot configuration, DynamicDataProvider <TDataService> provider)
 {
     if (_options == null)
     {
         _options = configuration.GetConfiguration <PgsqlDapperServiceOptions>();
     }
     return(provider.ProvideUsingPgsql(_options));
 }
Exemple #3
0
        public void CanGetAndModifyConnectionString()
        {
            var options = new PgsqlDapperServiceOptions();

            Assert.IsNotNull(options);

            options.ConnectionString = "abc";
            Assert.AreEqual("abc", options.ConnectionString);
        }
Exemple #4
0
        public static IIdentityDataService GetIdentityDataService()
        {
            var options = new PgsqlDapperServiceOptions
            {
                ConnectionFactory = new PgsqlConnectionFactory(),
                ConnectionString  = ConnectionStringHelper.GetConnectionStringFor("PGSQL")
            };

            return(new PgsqlDapperIdentityDataService(options));
        }
Exemple #5
0
 /// <summary>   Provide using pgsql. </summary>
 /// <param name="options">  Options for controlling the operation. </param>
 /// <returns>   A TDataService. </returns>
 protected internal abstract TDataService ProvideUsingPgsql(PgsqlDapperServiceOptions options);