|
@ -59,6 +59,11 @@ public class ServiceBase<T> : IDynamicApiController where T : EntityBase, new() |
|
|
return await _baseRep.UpdateAsync(entity); |
|
|
return await _baseRep.UpdateAsync(entity); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 批量更新实体类
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="array">实体类数组</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
[HttpPost] |
|
|
[HttpPost] |
|
|
public virtual async Task<bool> UpdateArray([Required][FromForm] T[] array) |
|
|
public virtual async Task<bool> UpdateArray([Required][FromForm] T[] array) |
|
|
{ |
|
|
{ |
|
@ -76,6 +81,11 @@ public class ServiceBase<T> : IDynamicApiController where T : EntityBase, new() |
|
|
return await _baseRep.DeleteByIdAsync(id); |
|
|
return await _baseRep.DeleteByIdAsync(id); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 批量删除实体类
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="array">实体类数组</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
[HttpPost] |
|
|
[HttpPost] |
|
|
public virtual async Task<bool> DeleteArray([Required][FromForm] T[] array) |
|
|
public virtual async Task<bool> DeleteArray([Required][FromForm] T[] array) |
|
|
{ |
|
|
{ |
|
|