Ejemplo n.º 1
0
        public async Task <VehicleResponse <VehicleMake> > SaveAsync(VehicleMake vehicleMake)
        {
            try
            {
                await _vehicleMakeRepository.AddMakeAsync(vehicleMake);

                await _unitOfWork.CompleteAsync();

                return(new VehicleResponse <VehicleMake>(vehicleMake));
            }
            catch (Exception ex)
            {
                return(new VehicleResponse <VehicleMake>($"An error occurred when saving the vehicleMake: {ex.Message}"));
            }
        }