public async Task <ActionResult <IEnumerable <Tenant> > > FindAll() { var tenantList = (await _tenantService.FindAllAsync()); if (!HttpContext.User.IsInRole(RoleConstant.TENANT_MANAGER)) { tenantList = tenantList.Select(t => t with { Properties = null }).ToList();
public async Task <ActionResult <IEnumerable <Tenant> > > FindAll() { var tenantList = (await _tenantService.FindAllAsync()) .Select(t => t with { Properties = null }).ToList();