public User GetUser([RouteData("id")]long? id) { _useRepository = new UserRepository(); using (_useRepository) { var user = _useRepository.GetByLazyLoading(id); if (user != null) { userInRoute = user; return user; } Response.Error404(); return null; } }