-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GeothermalResearchInstitute] Fix for dotnet-ef.
- Loading branch information
Showing
6 changed files
with
51 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...ResearchInstitute/GeothermalResearchInstitute.ServerConsole/Model/BjdireContextFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// <copyright file="BjdireContextFactory.cs" company="Shuai Zhang"> | ||
// Copyright Shuai Zhang. All rights reserved. | ||
// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. | ||
// </copyright> | ||
|
||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore.Design; | ||
|
||
namespace GeothermalResearchInstitute.ServerConsole.Model | ||
{ | ||
public class BjdireContextFactory : IDesignTimeDbContextFactory<BjdireContext> | ||
{ | ||
public BjdireContext CreateDbContext(string[] args) | ||
{ | ||
var builder = new DbContextOptionsBuilder<BjdireContext>(); | ||
Program.DbContextOptionsBuilderAction.Invoke(builder); | ||
return new BjdireContext(builder.Options); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters