Пример #1
0
        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);
        }
Пример #3
0
        public bool Delete(int?id)
        {
            if (id == null)
            {
                throw new NullReferenceException();
            }
            var get = Get(id);

            return(_religionRepository.Delete(get.Id));
        }
Пример #4
0
        public IActionResult DeleteReligion(long id)
        {
            Religion a = Religion_repo.Find(id);

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