mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 10:38:09 +08:00
Update Demo
This commit is contained in:
@@ -25,8 +25,8 @@ namespace SugarCodeGeneration
|
|||||||
/***生成实体***/
|
/***生成实体***/
|
||||||
|
|
||||||
//配置参数
|
//配置参数
|
||||||
string classProjectName = "SugarCodeGeneration";//实体类项目名称
|
string classProjectName = "Entity";//实体类项目名称
|
||||||
string classPath = "Models";//生成的目录
|
string classPath = "DbModels";//生成的目录
|
||||||
string classNamespace = "MyTest";//实体命名空间
|
string classNamespace = "MyTest";//实体命名空间
|
||||||
var classDirectory = Methods.GetSlnPath + "\\" + classProjectName + "\\" + classPath.TrimStart('\\');
|
var classDirectory = Methods.GetSlnPath + "\\" + classProjectName + "\\" + classPath.TrimStart('\\');
|
||||||
//执行生成
|
//执行生成
|
||||||
@@ -40,8 +40,8 @@ namespace SugarCodeGeneration
|
|||||||
/***生成DbContext***/
|
/***生成DbContext***/
|
||||||
|
|
||||||
//配置参数
|
//配置参数
|
||||||
var contextProjectName = "SugarCodeGeneration";//DbContext所在项目
|
var contextProjectName = "Dal";//DbContext所在项目
|
||||||
var contextPath = "DbContext";//dbcontext存储目录
|
var contextPath = "DbCore";//dbcontext存储目录
|
||||||
var savePath = Methods.GetSlnPath + "\\" + contextProjectName + "\\" + contextPath + "\\DbContext.cs";//具体文件名
|
var savePath = Methods.GetSlnPath + "\\" + contextProjectName + "\\" + contextPath + "\\DbContext.cs";//具体文件名
|
||||||
var tables = db.DbMaintenance.GetTableInfoList().Select(it => it.Name).ToList();
|
var tables = db.DbMaintenance.GetTableInfoList().Select(it => it.Name).ToList();
|
||||||
//执行生成
|
//执行生成
|
||||||
@@ -55,8 +55,8 @@ namespace SugarCodeGeneration
|
|||||||
/***生成BLL***/
|
/***生成BLL***/
|
||||||
|
|
||||||
//配置参数
|
//配置参数
|
||||||
var bllProjectName2 = "SugarCodeGeneration";//具体项目
|
var bllProjectName2 = "BLL";//具体项目
|
||||||
var bllPath2 = "BLL";//文件目录
|
var bllPath2 = "BaseBLL";//文件目录
|
||||||
var savePath2 = Methods.GetSlnPath + "\\" + bllProjectName2 + "\\" + bllPath2;//保存目录
|
var savePath2 = Methods.GetSlnPath + "\\" + bllProjectName2 + "\\" + bllPath2;//保存目录
|
||||||
var tables2 = db.DbMaintenance.GetTableInfoList().Select(it => it.Name).ToList();
|
var tables2 = db.DbMaintenance.GetTableInfoList().Select(it => it.Name).ToList();
|
||||||
//执行生成
|
//执行生成
|
||||||
|
Reference in New Issue
Block a user