public static GetSingleResultSet ( ) : Net.Code.ADONet.Tests.Unit.Person[] | ||
return | Net.Code.ADONet.Tests.Unit.Person[] |
public async Task AsEnumerableAsyncWithSelector_WhenCalledAndAwaited_ReturnsResultSet() { var command = PrepareCommand(); var commandBuilder = new CommandBuilder(command, DbConfig.Default); command.SetResultSet(Person.GetSingleResultSet()); var result = (await commandBuilder.AsEnumerableAsync(d => (Person)Person.From(d))).ToList(); Person.VerifySingleResultSet(result); }
public void AsEnumerableGeneric_WhenCalled_ReturnsResults() { var command = PrepareCommand(); var commandBuilder = new CommandBuilder(command, DbConfig.Default); command.SetResultSet(Person.GetSingleResultSet()); var result = commandBuilder.AsEnumerable <Person>().ToList(); Person.VerifySingleResultSet(result); }
public void AsEnumerableWithSelector_WhenCalled_ReturnsResults() { var command = PrepareCommand(); var commandBuilder = new CommandBuilder(command, DbConfig.Default); command.SetResultSet(Person.GetSingleResultSet()); var result = commandBuilder.AsEnumerable(d => (Person)Person.From(d)).ToList(); Person.VerifySingleResultSet(result); }
public void Single_WhenCalled_ReturnsSingleItem() { var command = PrepareCommand(); var commandBuilder = new CommandBuilder(command, DbConfig.Default); command.SetResultSet(Person.GetSingleResultSet()); var result = commandBuilder.Single <Person>(); Person.VerifyResult(result); }
public void AsDatatable_WhenCalled_ReturnsResults() { var command = PrepareCommand(); var commandBuilder = new CommandBuilder(command, DbConfig.Default); command.SetResultSet(Person.GetSingleResultSet()); var result = commandBuilder.AsDataTable(); Person.VerifyDataTable(result); }
public async Task AsEnumerableAsyncForType_WhenCalledAndAwaited_ReturnsResultSet() { var command = PrepareCommand(); var commandBuilder = new CommandBuilder(command, DbConfig.Default); command.SetResultSet(Person.GetSingleResultSet()); var result = new List <Person>(); await foreach (var p in commandBuilder.AsEnumerableAsync <Person>()) { result.Add(p); } Person.VerifySingleResultSet(result); }
public async Task AsEnumerableAsync_WhenCalledAndAwaited_ReturnsResultSet() { var command = PrepareCommand(); var commandBuilder = new CommandBuilder(command, DbConfig.Default); command.SetResultSet(Person.GetSingleResultSet()); var list = new List <dynamic>(); await foreach (var item in commandBuilder.AsEnumerableAsync()) { list.Add(item); } Person.VerifySingleResultSet(list); }