public async Task Count_WhereSpecification_FromNameValuePairs() { dynamic soh = new SalesOrderHeaders(); var total = await soh.CountAsync(new { CustomerID = 11212, ModifiedDate = new DateTime(2013, 10, 10) }); Assert.AreEqual(2, total); }
public async Task Count_TestWhereWrapping() { dynamic soh = new SalesOrderHeaders(); var total = await soh.CountAsync(where : "1=1 OR 0=0", CustomerID : 11212); Assert.AreEqual(17, total); }
public async Task Count_WhereSpecification_FromArgs() { var soh = new SalesOrderHeaders(); var total = await soh.CountAsync(where : "WHERE CustomerId=@0", args : 11212); Assert.AreEqual(17, total); }
public async Task Count_WhereSpecification_FromArgsPlusNameValue() { dynamic soh = new SalesOrderHeaders(); var total = await soh.CountAsync(where : "WHERE CustomerId=@0", args : 11212, ModifiedDate : new DateTime(2013, 10, 10)); Assert.AreEqual(2, total); }
public async Task Count_NoSpecification() { var soh = new SalesOrderHeaders(); var total = await soh.CountAsync(); Assert.AreEqual(31465, total); }