public ActionResult Details(int?id) { var customers = new DB_Context().Customers; Customer customer = null; try { customer = customers.Include("Membership").First(c => c.Id == id); } catch (Exception e) { return(Content("We dont have this customer")); } return(View(customer)); }