Exemplo n.º 1
0
        public DetailsModel GetUserVehicle(int userId, int vehicleId)
        {
            DetailsModel model   = null;
            Vehicle      vehicle = _vehicleRepository.GetByIdAndUserId(vehicleId, userId);

            if (vehicle != null)
            {
                model = DetailsModelFactory.CreateFromVehicle(vehicle);
            }
            return(model);
        }
Exemplo n.º 2
0
        // GET: MemberArea/Profile/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            UserInt user = _uow.GetRepository <IUserIntRepository>().GetById(id);

            if (user == null)
            {
                return(HttpNotFound());
            }

            return(View(DetailsModelFactory.CreateFromUserInt(user)));
        }