// GET: Customer/Delete/5 public ActionResult Delete(int id) { Lib.Customer libCustomer = CustomerRepo.GetCustomerById(id); var webCustomer = new Customer { Id = libCustomer.Id, FirstName = libCustomer.LastName, Birthday = libCustomer.Birthday, StoreId = libCustomer.StoreId }; return(View(webCustomer)); }
// GET: Customer/Details/5 public ActionResult Details(int id) { Lib.Customer libCustomer = CustomerRepo.GetCustomerById(id); Lib.Location libStore = StoreRepo.GetAllStores().First(); var webCust = new Customer { Id = libCustomer.Id, FirstName = libCustomer.FirstName, LastName = libCustomer.LastName, Birthday = libCustomer.Birthday, StoreId = libCustomer.StoreId }; CustomerViewModel cvm = new CustomerViewModel(libCustomer, libStore); return(View(cvm)); }