Example #1
0
 public ActionResult DeleteConfirmed(int id)
 {
     foreach (var a in _contactGroupService.GetAll(r => r.ContactListId == id))
     {
         _contactGroupService.DeleteById(a.Id);
     }
     foreach (var a in _contactService.GetAll(r => r.ContactListId == id))
     {
         _contactService.DeleteById(a.Id);
     }
     foreach (var a in _userContactListService.GetAll(r => r.ContactListId == id))
     {
         _userContactListService.DeleteById(a.Id);
     }
     _contactListService.DeleteById(id);
     _uow.SaveChanges();
     return(Json(new { success = true }));
 }