Beispiel #1
0
        public void Delete(int id)
        {
            if (id == 0)
            {
                throw new ArgumentException("The id can't be zero.");
            }

            repository.Delete(id);
        }
Beispiel #2
0
 public void Delete(int id)
 {
     try
     {
         using (_UserBaseRepository._context = _DbContext)
         {
             _UserBaseRepository.Delete(id);
             _UserBaseRepository._context.SaveChanges();
         }
     }
     catch (Exception error)
     {
         throw error;
     }
 }