예제 #1
0
파일: Files.cs 프로젝트: jannikbuschke/glow
        public async Task <Unit> Handle(DeletePortfolio request, CancellationToken cancellationToken)
        {
            Portfolio v = await ctx.Portfolios.Include(v => v.Files).SingleAsync(v => v.Id == request.Id);

            ctx.Remove(v);
            ctx.RemoveRange(v.Files);
            await ctx.SaveChangesAsync();

            return(Unit.Value);
        }
예제 #2
0
파일: Files.cs 프로젝트: jannikbuschke/glow
        public async Task <ActionResult <Unit> > Delete(DeletePortfolio request)
        {
            Unit result = await mediator.Send(request);

            return(result);
        }