Example #1
0
 public Category AddCategoryToArticle(int id, string CategoryName)
 {
     try
     {
         return(_repo.AddCategoryToArticle(id, CategoryName));
     }
     catch (SqlException sqlException)
     {
         Console.WriteLine(sqlException);
         throw;
     }
     catch (InvalidCastException invalidCastException)
     {
         Console.WriteLine(invalidCastException);
         throw;
     }
 }