public async override Task <VehicleCategoryView> Execute(UpdateVehicleCategoryCommand command, User?user) { VehicleCategory cat = await service.GetById(command.Id); if (!cat.IsOwner(user !)) { throw new AuthorizationException(); } await service.Update( cat, new VehicleCategoryUpdate( command.Name, command.Description ) ); throw new NotImplementedException(); // return mapper.Map<VehicleCategory, VehicleCategoryView>(cat); }
public async Task <ActionResult <VehicleCategoryForReturnDto> > Update(VehicleCategoryForCreationDto updateDto) { return(await vehicleCategoryService.Update(updateDto)); }