public Guid Create(CreateTechnicalInspectionViewModel model)
        {
            _unitOfWork.BeginTransaction();

            var mechanic = _mechanicRepository.GetById(model.Mechanic.Id);

            if (mechanic == null)
            {
                _unitOfWork.Commit();
                throw new Exception(ExceptionMessages.MechanicException.NOT_FOUND);
            }

            var vehicle = _vehicleRepository.GetById(model.Vehicle.Id);

            if (vehicle == null)
            {
                _unitOfWork.Commit();
                throw new Exception(ExceptionMessages.VehicleException.NOT_FOUND);
            }
            var user = _userRepository.GetById(model.User.Id);

            if (user == null)
            {
                _unitOfWork.Commit();
                throw new Exception(ExceptionMessages.UserException.NOT_FOUND);
            }

            var inspection = new TechnicalInspection(mechanic, vehicle, user, model.UserNote);

            _technicalInspectionRepository.Add(inspection);

            _unitOfWork.Commit();
            return(inspection.Id);
        }
        public ActionResult Add(CreateTechnicalInspectionViewModel model)
        {
            var inspection = _inspectionService.Create(model);

            return(Json(inspection));
        }