Skip to content

Commit 2e69eec

Browse files
Applied migrations assembly.
1 parent fc8813b commit 2e69eec

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<ImplicitUsings>enable</ImplicitUsings>
55
<Nullable>enable</Nullable>
66
<IsPackable>true</IsPackable>
7-
<Version>2.1.4</Version>
7+
<Version>2.1.5</Version>
88
<Authors>Andrey Serdyuk</Authors>
99
<Company>TaskHub</Company>
1010
<PackageTags>#TaskHub</PackageTags>

TaskHub.Shared.Infrastructure.EfCore/Bootstrap/Bootstrap.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ public static void AddAppDbContext<TContext>(this WebApplicationBuilder builder,
1313
{
1414
var options = new ContextOptions();
1515
action(options);
16-
builder.Services.AddDbContext<TContext>(o => o.UseNpgsql(
17-
builder.Configuration.GetConnectionString(options.ConnectionString),
18-
opts => opts.UseNetTopologySuite()
16+
builder.Services.AddDbContext<TContext>(o => o.UseNpgsql(builder.Configuration.GetConnectionString(options.ConnectionString), opts =>
17+
{
18+
opts.MigrationsAssembly(typeof(TContext).Assembly.FullName);
19+
opts.UseNetTopologySuite();
20+
}
1921
));
2022
}
2123

0 commit comments

Comments
 (0)