Adds code
This commit is contained in:
commit
269bf50c78
33 changed files with 1489 additions and 0 deletions
23
Tests/UnitTest1.cs
Normal file
23
Tests/UnitTest1.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using Autofac;
|
||||
using System.Data;
|
||||
using Insight.Database;
|
||||
namespace Tests
|
||||
{
|
||||
[TestClass]
|
||||
public class UnitTest1 : TestFixture
|
||||
{
|
||||
[TestMethod]
|
||||
public void MyTestMethod()
|
||||
{
|
||||
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");
|
||||
|
||||
var sql = "SELECT * FROM public.Foo";
|
||||
var customers = conn.Query(sql, commandType:CommandType.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue