public IActionResult Create(User user) { if (ModelState.IsValid) { userManager.Insert(user); cacheNinja.ClearCache("User_GetAll"); } else { ViewBag.Message = "Something went wrong!"; } return(RedirectToAction("Index")); }
public IActionResult Add(Workpoint workpoints, Hub hubs) { if (workpoints.Type == 1) { deviceManager.WorkpointInsert(workpoints); } else if (hubs.Type == 2) { deviceManager.HubInsert(hubs); } cacheNinja.ClearCache("Workpoint_GetAll"); cacheNinja.ClearCache("Hub_GetAll"); return(RedirectToAction("Index")); }
public IActionResult Edit(Book book) { BookManager manager = new BookManager(); manager.Update(book); CacheNinja ninja = new CacheNinja(); ninja.ClearCache("Book_GetAll"); return(RedirectToAction("Index")); }
public IActionResult Add(Book book) { BookManager bookManager = new BookManager(); bookManager.Insert(book); CacheNinja ninja = new CacheNinja(); ninja.ClearCache("Book_GetAll"); return(RedirectToAction("Index")); }