Update Demo

This commit is contained in:
sunkaixuan 2019-01-17 01:13:01 +08:00
parent 9b789010bb
commit 8e3ac35159
2 changed files with 4 additions and 3 deletions

View File

@ -40,7 +40,7 @@ namespace SugarCodeGeneration.Codes
FileHelper.CreateDirectory(classDirectory);
}
var files = Directory.GetFiles(classDirectory).ToList().Select(it=>classPath+"\\"+Path.GetFileName(it));
var xmlPath = GetSlnPath + @"\" + projectName + @"\SugarCodeGeneration.csproj";
var xmlPath = GetSlnPath + @"\" + projectName + @"\"+projectName+".csproj";
var xml = File.ReadAllText(xmlPath, System.Text.Encoding.UTF8);
var firstLine = System.IO.File.ReadLines(xmlPath, System.Text.Encoding.UTF8).First();

View File

@ -99,7 +99,7 @@ namespace SugarCodeGeneration
Methods.CreateDbContext(templatePath,savePath,model);
AddTask(contextPath, contextProjectName);
AddTask(contextProjectName,contextPath);
}
/// <summary>
@ -117,7 +117,7 @@ namespace SugarCodeGeneration
//如果生成全部可以把Where去掉
db.DbFirst.Where("Student", "School").IsCreateAttribute().CreateClassFile(classDirectory, classNamespace);
AddTask(classPath, classProjectName);
AddTask(classProjectName,classPath);
}
/// <summary>
@ -128,6 +128,7 @@ namespace SugarCodeGeneration
foreach (var item in CsprojList)
{
item.Start();
item.Wait();
}
}