public async Task <Result <int> > Handle(UpdatePlaceTypeCommand command, CancellationToken cancellationToken)
        {
            var item = await _repository.GetByIdAsync(command.Id);

            if (item == null)
            {
                return(Result <int> .Fail($"PlaceType Not Found."));
            }
            else
            {
                item.Name        = command.Name ?? item.Name;
                item.Code        = command.Code ?? item.Code;
                item.Icon        = command.Icon ?? item.Icon;
                item.Image       = command.Image ?? item.Image;
                item.CoverImage  = command.CoverImage ?? item.CoverImage;
                item.Description = command.Description ?? item.Description;
                item.CategoryId  = command.CategoryId ?? item.CategoryId;


                await _repository.UpdateAsync(item);

                await _unitOfWork.Commit(cancellationToken);

                return(Result <int> .Success(item.Id));
            }
        }
            public async Task <Result <TrafficTicketsResponse> > Handle(GetTrafficTicketByIdQuery query, CancellationToken cancellationToken)
            {
                var category = await _repository.GetByIdAsync(query.Id);

                var mappedCategory = _mapper.Map <TrafficTicketsResponse>(category);

                return(Result <TrafficTicketsResponse> .Success(mappedCategory));
            }
            public async Task <Result <int> > Handle(DeletePlaceTypeCommand command, CancellationToken cancellationToken)
            {
                var item = await _repository.GetByIdAsync(command.Id);

                await _repository.DeleteAsync(item);

                await _unitOfWork.Commit(cancellationToken);

                return(Result <int> .Success(item.Id));
            }