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