Example #1
0
        public IActionResult SaveVehicleDeparture(VehicleDeparture vehicle)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            _unitOfWork.VehicleDeparture.AddVehicleDeparture(vehicle);
            _unitOfWork.Complete();

            return(Ok(vehicle));
        }
Example #2
0
 public void AddVehicleDeparture(VehicleDeparture vehicleDeparture)
 {
     _apiContext.Add(vehicleDeparture);
 }