public TransactionsController(BrowsingService browsingService, TransactionService transactionService, IStore <Transaction> transactionStore, IStore <TransactionsUpload> uploadStore) { this.browsingService = browsingService; this.transactionService = transactionService; this.transactionStore = transactionStore; this.uploadStore = uploadStore; }
////HttpPost Delete //[HttpPost] //public ActionResult DeleteInstructorRating(int id) //{ // var service = GetBrowsingService(); // var model = service.GetInstructorByDetail(id); // return View(model); //} ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private BrowsingService GetBrowsingService() { var userId = User.Identity.GetUserId(); var service = new BrowsingService(userId); return(service); }
public ActionResult DeleteRating(AcademyRatingDelete model) { if (ModelState.IsValid) { var service = new BrowsingService(User.Identity.GetUserId()); if (service.DeleteRating(model.Id)) { return(RedirectToAction(nameof(Index))); } } return(View(model)); }