public void Delete(ReligionViewModel model) { var item = _repository.FindById(model.Id); if (item != null) { _repository.Delete(item); } }
public bool Delete(int?Id) { var idDel = Get(Id); if (idDel != null) { status = _religionRepository.Delete(Id); } return(status); }
public bool Delete(int?id) { if (id == null) { throw new NullReferenceException(); } var get = Get(id); return(_religionRepository.Delete(get.Id)); }
public IActionResult DeleteReligion(long id) { Religion a = Religion_repo.Find(id); if (a == null) { return(NotFound()); } Religion_repo.Delete(a); return(Ok()); }
public bool Delete(int id) { if (string.IsNullOrWhiteSpace(id.ToString())) { return(status); } else { var result = _religionRepository.Delete(id); return(result); } }
public bool Delete(int?Id) { if (Id == null) { Console.WriteLine("Insert Id"); Console.Read(); } else if (Id == ' ') { Console.WriteLine("Dont Insert Blank Caracter"); Console.Read(); } else { status = _religionRepository.Delete(Id); Console.WriteLine("Success"); } return(status); }
// DELETE: api/Relegions/5 public void Delete(int Id) { _religionRepository.Delete(Id); }
public async Task <DeleteReligionResults> Delete(int id) { return(await religionRepository.Delete(id)); }