public IEnumerable <Scene> GetAllForProject(GetListByParentIdQuery query) { var tableQuery = new TableQuery <SceneEntity>(); var results = Table.ExecuteQuery(tableQuery.Where( TableQuery.CombineFilters( TableQuery.GenerateFilterCondition(nameof(SceneEntity.AccountId), QueryComparisons.Equal, query.Credentials.AccountId), TableOperators.And, TableQuery.GenerateFilterCondition(nameof(SceneEntity.ProjectId), QueryComparisons.Equal, query.ParentId)))); return(results.Select(SceneMapper.Map)); }
public Option <IEnumerable <Scene>, ErrorResult> GetAllFor(GetListByParentIdQuery query) { return(_getListByParentIdQueryValidator .Validate(query) .OnSuccess(errorBuilder => _sceneQueryRepository.GetAllForProject(query))); }