public ActionResult CustomerDetail(int id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_customer custdetail = dbmodel.CustomerDetails(id); return(View(custdetail)); }