Beispiel #1
0
        public ActionResult UpdateVehicleType(int ID, VehicleTypeUpdateDto vehicleupdatedto)
        {
            var vehicleModelfromRepo = _repo.GetDataByID(ID);

            if (vehicleModelfromRepo == null)
            {
                return(NotFound());
            }

            _mapper.Map(vehicleupdatedto, vehicleModelfromRepo);

            _repo.UpdateVehicle(vehicleModelfromRepo);

            _repo.SaveChanges();

            return(NoContent());
        }