public async Task <IActionResult> Delete(string id)
        {
            var result = await lineService.Delete(x => x.Id == id) > 0;

            return(Ok(new JsonResultDto <bool>
            {
                Data = result,
                Message = result ? null : "操作失败"
            }));
        }
Example #2
0
 public async Task <IActionResult> Delete(int id)
 {
     if (await _lineService.Delete(id))
     {
         return(NoContent());
     }
     throw new Exception("Error deleting the model name");
 }