Skip to content

Commit

Permalink
#13 同样感谢 @@jackhuazai
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreySu committed Feb 18, 2019
1 parent 032531a commit aad2bc5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Senparc.Web/DbContext/SenparcDbContextFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ public class SenparcDbContextFactory : IDesignTimeDbContextFactory<SenparcEntiti
{
public SenparcEntities CreateDbContext(string[] args)
{
//修复 https://github.com/SenparcCoreFramework/SCF/issues/13 发现的问题(在非Web环境下无法得到网站根目录路径)
IRegisterService register = RegisterService.Start(new SenparcSetting());
CO2NET.Config.RootDictionaryPath = Path.Combine(AppContext.BaseDirectory, "..\\..\\..\\");
CO2NET.Config.RootDictionaryPath = Path.Combine(AppContext.BaseDirectory, "..\\..\\..\\"); //

var builder = new DbContextOptionsBuilder<SenparcEntities>();
builder.UseSqlServer(SenparcDatabaseConfigs.ClientConnectionString, b => b.MigrationsAssembly("Senparc.Web"));
Expand Down

0 comments on commit aad2bc5

Please sign in to comment.