初步完成代码级重写通用接口功能
This commit is contained in:
@@ -19,7 +19,6 @@ namespace Tnb.Vengine.AppService;
|
||||
/// 视图模型服务类
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = ModuleConst.Tag, Area = ModuleConst.Area, Order = 1104, KeepVerb = true)]
|
||||
[Route("api/[area]/[controller]/[action]")]
|
||||
public class VmodelPageAppService : VengineAppService<VmodelPage, VmGetInput, VmodelPage, VmQueryInput, VmGetListInput, VmodelPage, VmodelPageCreateInput, VmodelPageUpdateInput>, IVmodelPageAppService
|
||||
{
|
||||
/// <summary>
|
||||
@@ -29,35 +28,6 @@ public class VmodelPageAppService : VengineAppService<VmodelPage, VmGetInput, Vm
|
||||
{
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 新增 模型
|
||||
///// </summary>
|
||||
//public override async Task<dynamic> CreateAsync(VmCreateInput input)
|
||||
//{
|
||||
// ThrowIf.IsNull(input.data);
|
||||
// VmodelPage vpage = input.data.Adapt<VmodelPage>();
|
||||
// await _db.Insertable(vpage).ExecuteCommandAsync();
|
||||
// return vpage;
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 更新 数据
|
||||
///// </summary>
|
||||
//public override async Task<dynamic> UpdateAsync(VmUpdateInput input)
|
||||
//{
|
||||
// ThrowIf.IsNull(input.data);
|
||||
// if (!input.data.ContainsKey(nameof(VmodelPage.id)))
|
||||
// {
|
||||
// throw new Exception($"更新数据时主键({nameof(VmodelPage.id)})不可为空");
|
||||
// }
|
||||
// var id = input.data[nameof(VmodelPage.id)].ToString();
|
||||
// var model = await _db.Queryable<VmodelPage>().FirstAsync(a => a.id == id);
|
||||
// ThrowIf.IsNull(model, $"找不到id={id}的视图页面数据");
|
||||
// input.data.Adapt(model, TypeAdapter.IgnoreNull);
|
||||
// await _db.Updateable(model).WhereColumns(a => a.id).ExecuteCommandAsync();
|
||||
// return model;
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 从数据表创建模型
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user