public async Task <IActionResult> Delete([FromBody] Persons persons) { var location = GetControllerActionNames(); bool resultData = false; try { resultData = await _npRepo.Delete(persons); } catch (Exception e) { _logger.LogWarn($"{location}: {e.Message} - {e.InnerException}"); } return(Ok(resultData)); }
public async void Delete(string id) { await _rep.Delete(id); }
public void Delete(int id) { _personsRepository.Delete(id); }
public ActionResult Delete(long id, object dummy) { _personsRepository.Delete(id); return(RedirectToAction("Index")); }