Example #1
0
        public async Task <IActionResult> Update(int id, [FromBody] MalfunctionDTO obj)
        {
            obj.Id = id;

            var result = await _malfunctionService.UpdateAsync(obj);

            return(result != null
                ? NoContent()
                : (IActionResult)BadRequest());
        }
Example #2
0
 public async Task <IActionResult> Update(int id, [FromBody] MalfunctionDTO obj)
 {
     obj.Id = id;
     return(Json(await _malfunctionService.UpdateAsync(obj)));
 }