public ActionResult Details(int id = 0) { var movement = _movementRepo.Find(id); if (movement == null) { return(HttpNotFound("Cannot find movement with given ID")); } const string format = "stock item {0} from {1} to {2}"; var message = string.Format(format, movement.Stock.Item.Name, movement.FromLocation.Name, movement.ToLocation.Name); LogActivity("moved ", message, movement.Id); return(View(movement)); }