Пример #1
0
 public Brand DeleteBrand(int id)
 {
     if (id <= 0)
     {
         throw new ArgumentException("Incorrect ID entered");
     }
     if (GetBrandById(id) == null)
     {
         throw new InvalidOperationException("No brand with such ID found");
     }
     return(BrandRepository.DeleteBrandInRepo(id));
 }