Esempio n. 1
0
 public static void DeleteCar(Cars car)
 {
     if (_carsLogic.DeleteCar(car))
     {
         List <Blogs> ListBlogs = new List <Blogs>();
         ListBlogs = BlogsPL.GetCarBlogs(car);
         foreach (var item in ListBlogs)
         {
             BlogsPL.DeleteBlogCar(item, car.ID);
         }
     }
 }
Esempio n. 2
0
 public static void DeleteUser(Users user)
 {
     if (_usersLogic.DeleteUser(user))
     {
         List <Blogs> ListBlogs = new List <Blogs>();
         ListBlogs = BlogsPL.GetUserBlogs(user);
         List <Cars> ListCars = new List <Cars>();
         ListCars = CarsPL.GetUserCars(user);
         foreach (var item in ListBlogs)
         {
             BlogsPL.DeleteBlogUser(item, user.Nickname);
         }
         foreach (var item in ListCars)
         {
             CarsPL.DeleteCar(item);
         }
     }
 }