public async Task <Response> Handle(Request request)
 {
     return(new Response()
     {
         Tag = TagApiModel.FromTag(await _context.Tags
                                   .Include(x => x.Tenant)
                                   .SingleAsync(x => x.Id == request.Id && x.Tenant.UniqueId == request.TenantUniqueId))
     });
 }
Пример #2
0
            public async Task <Response> Handle(Request request)
            {
                var tags = await _context.Tags
                           .Include(x => x.Tenant)
                           .Where(x => x.Tenant.UniqueId == request.TenantUniqueId)
                           .ToListAsync();

                return(new Response()
                {
                    Tags = tags.Select(x => TagApiModel.FromTag(x)).ToList()
                });
            }