Auto stash before merge of "main" and "origin/main"
This commit is contained in:
parent
21d7128e74
commit
521190475d
41 changed files with 991 additions and 1150 deletions
50
Tests/PostgresTests.cs
Normal file
50
Tests/PostgresTests.cs
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
using Autofac;
|
||||
using System.Data;
|
||||
using Insight.Database;
|
||||
|
||||
namespace Tests
|
||||
{
|
||||
[TestClass]
|
||||
public class PostgresTests : TestFixture
|
||||
{
|
||||
[TestMethod]
|
||||
public void TestDefaultConnection()
|
||||
{
|
||||
var conn = Container.Resolve<IDbConnection>();
|
||||
//https://www.reddit.com/r/dotnet/comments/6wdoyn/how_to_properly_register_dapper_on_net_core_2_di/
|
||||
//https://www.code4it.dev/blog/postgres-crud-dapper/
|
||||
//https://stackoverflow.com/questions/69169247/how-to-create-idbconnection-factory-using-autofac-for-dapper
|
||||
|
||||
conn.ExecuteSql("SELECT 1 as p");
|
||||
|
||||
}
|
||||
|
||||
|
||||
[TestMethod]
|
||||
public void TryTenantSetupService()
|
||||
{
|
||||
var conn = Container.Resolve<IDbConnection>();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task TryDbSetup()
|
||||
{
|
||||
var conn = Container.Resolve<IDbConnection>();
|
||||
|
||||
var dbSetup = new Database.IdentitySystem.DbSetup(conn);
|
||||
await dbSetup.CreateSystem("swp");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SetupPostgresql_LISTEN()
|
||||
{
|
||||
//var builder = new ConfigurationBuilder()
|
||||
// .AddPostgresConfiguration(options =>
|
||||
// {
|
||||
// options.ConnectionString = "Host=192.168.1.57;Database=ptdb01;Username=postgres;Password=3911";
|
||||
// options.Channel = "config_changes";
|
||||
// options.ConfigurationQuery = @"select * from dev.app_configuration";
|
||||
// });
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue