예제 #1
0
 public async Task <Response> Handle(Request request)
 {
     return(new Response()
     {
         Tenant = TenantApiModel.FromTenant(await _context.Tenants
                                            .SingleAsync(x => x.Id == request.Id))
     });
 }
            public async Task <Response> Handle(Request request)
            {
                var tenants = await _context.Tenants
                              .ToListAsync();

                return(new Response()
                {
                    Tenants = tenants.Select(x => TenantApiModel.FromTenant(x)).ToList()
                });
            }