代码生成添加方法返回实体类

This commit is contained in:
不做码农
2023-07-20 18:22:36 +08:00
parent 95b0178dd4
commit 6d6a03ddea
3 changed files with 5 additions and 5 deletions

View File

@@ -112,12 +112,12 @@ $end
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public int Add${replaceDto.ModelTypeName}(${replaceDto.ModelTypeName} model)
public ${replaceDto.ModelTypeName} Add${replaceDto.ModelTypeName}(${replaceDto.ModelTypeName} model)
{
$if(null != genTable.SubTableName && "" != genTable.SubTableName)
return Context.InsertNav(model).Include(s1 => s1.${genTable.SubTable.ClassName}Nav).ExecuteCommand() ? 1 : 0;
return Context.InsertNav(model).Include(s1 => s1.${genTable.SubTable.ClassName}Nav).ExecuteReturnEntity();
$else
return Add(model, true);
return Insertable(model).IgnoreColumns(true).ExecuteReturnEntity();
$end
}