Exemple #1
0
        public void DeletePlatesAndRestaurant(int id)
        {
            var restaurantModel = _restaurantRepository.GetPlateByRestaurant(id);

            foreach (var plate in restaurantModel.Plates)
            {
                _plateRepository.Delete(plate.Id);
            }
            _restaurantRepository.Delete(id);
        }
Exemple #2
0
 public void Delete(int id)
 {
     _plateRepository.Delete(_plateRepository.GetById(id));
 }
 public ActionResult DeleteConfirm(int id)
 {
     _plateRepository.Delete(id);
     _unitOfWork.DeletePlate(id);
     return(RedirectToAction("Index"));
 }