예제 #1
0
        public async ValueTask <KSociety.Com.App.Dto.Res.Import.Common.TagGroup> ExecuteAsync(TagGroup request, CancellationToken cancellationToken = default)
        {
            var result = await _tagGroupRepository.ImportCsvAsync(request.ByteArray, cancellationToken).ConfigureAwait(false);

            var output = await _unitOfWork.CommitAsync(cancellationToken).ConfigureAwait(false);

            //return new KSociety.Com.App.Dto.Res.Import.Common.TagGroup(true);

            return(output == -1 ? new KSociety.Com.App.Dto.Res.Import.Common.TagGroup(result) : new KSociety.Com.App.Dto.Res.Import.Common.TagGroup(false));
        }