// GET: CustomerController/Delete/5 public ActionResult Delete(string id) { var cCustomer = _storeRepo.GetOneCustomer(id); CCredential cCredential = _storeRepo.GetOneCredential(cCustomer.Email); var viewCustomer = ViewModelMapper.MapSingleCustomerWithCredential(cCustomer, cCredential); return(View(viewCustomer)); }
public ActionResult Details(string id) { CCustomer cCustomer = _storeRepo.GetOneCustomer(id); CCredential cCredential = _storeRepo.GetOneCredential(cCustomer.Email); // concurrent if (cCustomer == null) { ModelState.AddModelError("", "Another admin has just deleted this customer"); return(View()); } if (cCredential == null) { ModelState.AddModelError("", "Another admin has just deleted this email"); return(View()); } var viewCustomer = ViewModelMapper.MapSingleCustomerWithCredential(cCustomer, cCredential); return(View(viewCustomer)); }