public async Task <IActionResult> Delete(string id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var affectedResult = await _lopHocPhanService.Delete(id); if (affectedResult == 0) { return(BadRequest()); } return(Ok()); }
public void Delete(FormDataCollection form) { var key = Convert.ToInt32(form.Get("key")); _lopHocPhanService.Delete(key); }