优化代码

This commit is contained in:
不做码农
2022-06-09 21:15:30 +08:00
parent e209c4a192
commit 71bbc27b1e
15 changed files with 44 additions and 55 deletions

View File

@@ -106,6 +106,24 @@ ${foreach(item in genTable.Columns)}
$if((item.IsInsert))
it.$item.CsharpField,
$end
${end}
});
return response;
}
/// <summary>
/// 修改${genTable.FunctionName}
/// </summary>
/// <param name="parm"></param>
/// <returns></returns>
public int Update${replaceDto.ModelTypeName}(${replaceDto.ModelTypeName} parm)
{
var response = _${replaceDto.ModelTypeName}Repository.Update(w => w.${replaceDto.PKName} == parm.${replaceDto.PKName}, it => new ${replaceDto.ModelTypeName}()
{
$foreach(item in genTable.Columns)
$if((item.IsEdit))
$item.CsharpField = parm.$item.CsharpField,
$end
${end}
});
return response;