Skip to content

Commit 365574e

Browse files
committed
resolved #40
1 parent b24c5a4 commit 365574e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/AbpCompanyName.AbpProjectName.EntityFramework/EntityFramework/AbpProjectNameDbContext.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Abp.EntityFramework;
1+
using System.Data.Common;
2+
using Abp.EntityFramework;
23

34
namespace AbpCompanyName.AbpProjectName.EntityFramework
45
{
@@ -29,5 +30,18 @@ public AbpProjectNameDbContext(string nameOrConnectionString)
2930
{
3031

3132
}
33+
34+
//This constructor is used in tests
35+
public AbpProjectNameDbContext(DbConnection existingConnection)
36+
: base(existingConnection, false)
37+
{
38+
39+
}
40+
41+
public AbpProjectNameDbContext(DbConnection existingConnection, bool contextOwnsConnection)
42+
: base(existingConnection, contextOwnsConnection)
43+
{
44+
45+
}
3246
}
3347
}

0 commit comments

Comments
 (0)