Example #1
0
        public async Task ProcessApply_WithPassTest()
        {
            var userId          = 435188;
            var blogChangeApply = await _blogChangeApplyRepository.GetWaiting(userId).FirstOrDefaultAsync();

            Assert.NotNull(blogChangeApply);

            Assert.True(await blogChangeApply.Pass());
            _unitOfWork.RegisterDirty(blogChangeApply);
            Assert.True(await _unitOfWork.CommitAsync());
            await blogChangeApply.Passed();
        }
 public async Task <List <BlogChangeApplyDTO> > GetWaitings()
 {
     return(await _blogChangeApplyRepository.GetWaiting()
            .OrderByDescending(x => x.ApplyTime)
            .ProjectTo <BlogChangeApplyDTO>().ToListAsync());
 }