Exemplo n.º 1
0
 public async Task <Response> Handle(Request request)
 {
     return(new Response()
     {
         Profile = ProfileApiModel.FromProfile(await _context.Profiles
                                               .Include(x => x.Tenant)
                                               .SingleAsync(x => x.Id == request.Id && x.Tenant.UniqueId == request.TenantUniqueId))
     });
 }
Exemplo n.º 2
0
            public async Task <Response> Handle(Request request)
            {
                var profiles = await _context.Profiles
                               .Include(x => x.Tenant)
                               .Where(x => x.Tenant.UniqueId == request.TenantUniqueId)
                               .ToListAsync();

                return(new Response()
                {
                    Profiles = profiles.Select(x => ProfileApiModel.FromProfile(x)).ToList()
                });
            }