mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 10:38:09 +08:00
Update Demo
This commit is contained in:
@@ -13,7 +13,7 @@ namespace SugarCodeGeneration
|
||||
{
|
||||
private const SqlSugar.DbType sqlServer = SqlSugar.DbType.SqlServer;
|
||||
private const string projectName = "SugarCodeGeneration";
|
||||
private const string classPath= projectName + @"\Models";
|
||||
private const string classPath= "Models";
|
||||
private const string classNamespace = "MyTest";
|
||||
private const string connectionString = "server=.;uid=sa;pwd=@jhl85661501;database=SqlSugar4XTest";
|
||||
|
||||
@@ -25,12 +25,12 @@ namespace SugarCodeGeneration
|
||||
ConnectionString = connectionString,
|
||||
IsAutoCloseConnection = true
|
||||
});
|
||||
var classDirectory = Methods.GetSlnPath +"\\"+ classPath.TrimStart('\\');
|
||||
var classDirectory = Methods.GetSlnPath +"\\"+projectName+"\\"+ classPath.TrimStart('\\');
|
||||
|
||||
//if all then remove .Where
|
||||
db.DbFirst.Where("Student","School").CreateClassFile(classDirectory, classNamespace);
|
||||
|
||||
//Methods.AddCsproj(classDirectory, projectName);
|
||||
Methods.AddCsproj(classPath, projectName);
|
||||
|
||||
//Generation DbContext
|
||||
}
|
||||
|
Reference in New Issue
Block a user