public async Task <ResultObject> GetFileWithAttachmentTypeAsync(AttachmentDto attachmentFilterDto) { ResultObject resultObject = new ResultObject(); var att = _mapper.Map <Attachment>(attachmentFilterDto); var file = await _uploadService.CheckIfFileAlreadyExistsAsync(att); if (file) { resultObject.ServerErrors.Add(new ServerErr() { Hint = $"فایل {attachmentFilterDto.AttachmentType.Desc} قبلا ثبت شده است" }); } return(resultObject); }