自动生成Service.cs的Add改回返回插入的主键
This commit is contained in:
parent
03b67f7fef
commit
75bb672063
@ -133,7 +133,7 @@ if (@column.QueryWhether == "Y"){
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[ApiDescriptionSettings(Name = "add", Description = "增加@(@Model.BusName)", Order = 990), HttpPost]
|
[ApiDescriptionSettings(Name = "add", Description = "增加@(@Model.BusName)", Order = 990), HttpPost]
|
||||||
[DisplayName("增加@(@Model.BusName)")]
|
[DisplayName("增加@(@Model.BusName)")]
|
||||||
public async Task<bool> Add(Add@(@Model.ClassName)Input input)
|
public async Task<long> Add(Add@(@Model.ClassName)Input input)
|
||||||
{
|
{
|
||||||
var entity = input.Adapt<@(@Model.ClassName)>();
|
var entity = input.Adapt<@(@Model.ClassName)>();
|
||||||
@if(Model.RemoteVerify){
|
@if(Model.RemoteVerify){
|
||||||
@ -144,7 +144,8 @@ if (@column.QueryWhether == "Y"){
|
|||||||
@:throw Oops.Oh(ErrorCodeEnum.D1006);
|
@:throw Oops.Oh(ErrorCodeEnum.D1006);
|
||||||
@:}
|
@:}
|
||||||
}
|
}
|
||||||
return await _@(@Model.LowerClassName)Rep.InsertAsync(entity);
|
await _@(@Model.LowerClassName)Rep.InsertAsync(entity);
|
||||||
|
return entity.@(@PKName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user