public void CanCreate() { var options = new PgsqlDapperServiceOptions(); Assert.IsNotNull(options); Assert.IsNotNull(options.ConnectionFactory); }
/// <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)); }
public void CanGetAndModifyConnectionString() { var options = new PgsqlDapperServiceOptions(); Assert.IsNotNull(options); options.ConnectionString = "abc"; Assert.AreEqual("abc", options.ConnectionString); }
public static IIdentityDataService GetIdentityDataService() { var options = new PgsqlDapperServiceOptions { ConnectionFactory = new PgsqlConnectionFactory(), ConnectionString = ConnectionStringHelper.GetConnectionStringFor("PGSQL") }; return(new PgsqlDapperIdentityDataService(options)); }
/// <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);