public ActionResult Details(int id) { var service = ExecuteQuery( session => session.QueryOver <Service>() .Where(s => s.Id == id && !s.IsDeleted) .Fetch(s => s.Category).Eager .Fetch(s => s.Image).Eager .Fetch(s => s.Client).Eager .SingleOrDefault()); if (service == null) { return(View("ServiceNotFound")); } var logViewCommand = new LogViewCommand(service.Id, Request.UserHostAddress); ExecuteNonBlockingCommand(logViewCommand); return(View(service)); }
public ActionResult Details(int id) { var service = ExecuteQuery( session => session.QueryOver<Service>() .Where(s => s.Id == id && !s.IsDeleted) .Fetch(s => s.Category).Eager .Fetch(s => s.Image).Eager .Fetch(s => s.Client).Eager .SingleOrDefault()); if (service == null) { return View("ServiceNotFound"); } var logViewCommand = new LogViewCommand(service.Id, Request.UserHostAddress); ExecuteNonBlockingCommand(logViewCommand); return View(service); }