Update Demo

This commit is contained in:
sunkaixuan
2019-01-16 22:03:41 +08:00
parent 800f1d0810
commit 2f38dc4750
4 changed files with 36 additions and 16 deletions

View File

@@ -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
}