Exemplo n.º 1
0
        public async Task Count_WhereSpecification_FromNameValuePairs()
        {
            var soh   = new SalesOrderHeader();
            var total = await soh.CountAsync(new { CustomerID = 11212, ModifiedDate = new DateTime(2013, 10, 10) });

            Assert.AreEqual(2, total);
        }
Exemplo n.º 2
0
        public async Task Count_TestWhereWrapping()
        {
            dynamic soh   = new SalesOrderHeader();
            var     total = await soh.CountAsync(where : "1=1 OR 0=0", CustomerID : 11212);

            Assert.AreEqual(17, total);
        }
Exemplo n.º 3
0
        public async Task Count_WhereSpecification_FromArgsPlusNameValue()
        {
            dynamic soh   = new SalesOrderHeader();
            var     total = await soh.CountAsync(where : "WHERE CustomerId=@0", args : 11212, ModifiedDate : new DateTime(2013, 10, 10));

            Assert.AreEqual(2, total);
        }
Exemplo n.º 4
0
        public async Task Count_WhereSpecification_FromArgs()
        {
            var soh   = new SalesOrderHeader();
            var total = await soh.CountAsync(where : "WHERE CustomerId=@0", args : 11212);

            Assert.AreEqual(17, total);
        }
Exemplo n.º 5
0
        public async Task Count_NoSpecification()
        {
            var soh   = new SalesOrderHeader();
            var total = await soh.CountAsync();

            Assert.AreEqual(31465, total);
        }
Exemplo n.º 6
0
        public async Task CountAsync_WhereSpecification()
        {
            var soh   = new SalesOrderHeader();
            var total = await soh.CountAsync(where : "WHERE CustomerId=@0", args : 30052);

            Assert.AreEqual(4, total);
        }