Beispiel #1
0
 public async Task <GetTenantByIdResponse> Handle(GetTenantByIdRequest request)
 {
     return(new GetTenantByIdResponse()
     {
         Tenant = TenantApiModel.FromTenant(await _dataContext.Tenants.FindAsync(request.Id))
     });
 }
            public async Task <GetTenantsResponse> Handle(GetTenantsRequest request)
            {
                var tenants = await _dataContext.Tenants.ToListAsync();

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