/// <summary> /// Executes the list of queries, returning the results of the queries. /// </summary> /// <param name="driver">The driver to execute the query on</param> /// <param name="queries">The queries to execute</param> /// <returns>The result of the commands containing the results of each query.</returns> protected ICommandResult ExecuteQueriesOnDriver(IDriver driver, List<IDatabaseObject> queries) { ICommandResult result = null; result = new CommandResult() { Success = true, CommandResultType = CommandResultType.Success, Then = { Queries = new List<IDatabaseObject>(queries) }, Now = { Queries = new List<IDatabaseObject>() } }; foreach (IDatabaseObject query in queries) { // todo is this correct, or should it instead have a CollectionValue? result.Now.Queries.AddRange(driver.Query(query)); } return result; }