1234567891011121314151617181920212223 |
- using System;
- using Test.Utils.DataAccess;
-
- namespace Test.Utils
- {
- public class Tests
- {
- public static LuUtilsDbContext GetDataBaseContext()
- {
- return
- new LuUtilsDbContext(
- "User ID=dev;Password=dev;Host=localhost;Port=5432;Database=luticate2_utils;Pooling=true;");
- }
-
- public static void TestRealDb(Action<LuUtilsDbContext> func)
- {
- var dbContext = GetDataBaseContext();
- dbContext.Database.BeginTransaction();
- func(dbContext);
- dbContext.Database.RollbackTransaction();
- }
- }
- }
|