Exemple #1
0
 public async Task <Response> Handle(Request request)
 {
     return(new Response()
     {
         BoundedContext = BoundedContextApiModel.FromBoundedContext(await _context.BoundedContexts
                                                                    .Include(x => x.Tenant)
                                                                    .SingleAsync(x => x.Id == request.Id && x.Tenant.UniqueId == request.TenantUniqueId))
     });
 }
Exemple #2
0
            public async Task <Response> Handle(Request request)
            {
                var boundedContexts = await _context.BoundedContexts
                                      .Include(x => x.Tenant)
                                      .Where(x => x.Tenant.UniqueId == request.TenantUniqueId)
                                      .ToListAsync();

                return(new Response()
                {
                    BoundedContexts = boundedContexts.Select(x => BoundedContextApiModel.FromBoundedContext(x)).ToList()
                });
            }