示例#1
0
        public async override Task Execute(DeleteVehicleCategoryCommand command, User?user)
        {
            var cat = await service.GetById(command.Id);

            if (!cat.IsOwner(user !))
            {
                throw new AuthorizationException();
            }

            await service.Delete(cat);
        }
示例#2
0
 public async Task <ActionResult <VehicleCategoryForReturnDto> > Delete(int itemId)
 {
     return(await vehicleCategoryService.Delete(itemId));
 }