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));
        }
Esempio n. 4
0
        public IActionResult DeleteReligion(long id)
        {
            Religion a = Religion_repo.Find(id);

            if (a == null)
            {
                return(NotFound());
            }
            Religion_repo.Delete(a);
            return(Ok());
        }
Esempio n. 5
0
 public bool Delete(int id)
 {
     if (string.IsNullOrWhiteSpace(id.ToString()))
     {
         return(status);
     }
     else
     {
         var result = _religionRepository.Delete(id);
         return(result);
     }
 }
Esempio n. 6
0
 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);
 }
Esempio n. 7
0
 // DELETE: api/Relegions/5
 public void Delete(int Id)
 {
     _religionRepository.Delete(Id);
 }
Esempio n. 8
0
 public async Task <DeleteReligionResults> Delete(int id)
 {
     return(await religionRepository.Delete(id));
 }