public IActionResult Delete(int id) { if (!ModelState.IsValid) { return(BadRequest()); } if (!_appService.Delete(id)) { return(BadRequest()); } return(Json("OK")); }
public async Task <IHttpActionResult> Delete(int id) { var result = await _service.Delete(id); return(Ok(result)); }