如果数据库不存在生成数据库
This commit is contained in:
parent
2c00f5902f
commit
b1515c77a8
|
@ -3,10 +3,12 @@
|
||||||
namespace CmdjyHisFront.Dal
|
namespace CmdjyHisFront.Dal
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// HIS前置机数据库h
|
/// HIS前置机数据库
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class HisFrontDbContext:DbContext
|
public partial class HisFrontDbContext:DbContext
|
||||||
{
|
{
|
||||||
public HisFrontDbContext() : base("HisFrontDbContext") { }
|
public HisFrontDbContext() : base("HisFrontDbContext") {
|
||||||
|
this.Database.CreateIfNotExists();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user