public ActionResult deleteLot(int id, string currentFilter, string currentNumLot, string currentPage) { using (WakilRecouvContext WakilContext = new WakilRecouvContext()) { using (UnitOfWork UOW = new UnitOfWork(WakilContext)) { LotService LotService = new LotService(UOW); LotService.Delete(LotService.GetById(id)); LotService.Commit(); return(RedirectToAction("ConsulterClients", "Lot", new { currentFilter, currentNumLot, currentPage })); } } }