public async Task ExecuteAsync(DocumentLinkDto dto)
        {
            var repo = Uow.GetRepository <DocumentLink>();
            var link = await repo.GetByIdAsync(dto.Id);

            repo.Delete(link);
            await Uow.SaveChangesAsync();
        }
示例#2
0
        public async Task <DocumentLink> ExecuteAsync(DocumentLinkDto dto)
        {
            var repo = Uow.GetRepository <DocumentLink>();
            var link = Mapper.Map <DocumentLink>(dto);
            await repo.CreateAsync(link);

            await Uow.SaveChangesAsync();

            return(link);
        }