public async Task getAttachmentById(int attachmentId) { if (await attachmentRepository.GetAttachmentById(attachmentId) == null) { throw new AttachmentNotFoundExcpetion("attachment not exist"); } }
public async Task <AttachmentEntity> GetAttachmentById(int attachmentId) { try { return(await attachmentRepository.GetAttachmentById(attachmentId)); } catch (Exception e) { throw e; } }