| | |
| | | using FlexJobApi.Core; |
| | | using MediatR; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | { |
| | | public Task<Guid> Handle(SaveDictionaryCategoryCommand request, CancellationToken cancellationToken) |
| | | { |
| | | return request.SaveData<DictionaryCategory, SaveDictionaryCategoryCommand>(); |
| | | return request.SaveData<DictionaryCategory, SaveDictionaryCategoryCommand>( |
| | | (q, e, r) => q.Any(it => it.Id != request.Id && it.Code == request.Code), |
| | | cancellationToken); |
| | | } |
| | | } |
| | | } |