//所引用的using
var modelSp = "Hanlly.MedicalEthics.Models.MedicalQualityDB";
var repSp = "Hanlly.MedicalEthics.Repository";
var repBaseSp = "Hanlly.MedicalEthics.Repository.Infrastructure";
string modelDir = @"D:\work\yiliao\Hanlly.MedicalEthics.Models\MedicalQualityDB"; //需要生成的实体类文件所在的路径
var fileList = Directory.GetFiles(modelDir, "*.cs");
int fileCount = 0;
foreach (var file in fileList)
{
var fileInfo = new FileInfo(file);
var fileName = Path.GetFileNameWithoutExtension(file);
if(fileName.EndsWith("Context")){
continue;
}
var modelName = fileName;
fileName = fileName.Replace("_", "");
var repFileName = fileName + "Repository";
var repFileNameWithExtension = repFileName + ".cs";