public void SELECT()
        {
            var query =
                from f in _family.AsObjectQueryable <User>()
                select f;
            var actual = query.ToList().OrderBy(x => x.Id).ToList();

            Assert.Equal(_users.Length, actual.Count);
            for (int i = 0; i < _users.Length; i++)
            {
                var objUser = _users[i];
                var dbUser  = actual[i];

                Assert.Equal(objUser.Id, dbUser.Id);
                Assert.Equal(objUser.Name, dbUser.Name);
                Assert.Equal(objUser.Email, dbUser.Email);
                Assert.Equal(objUser.Age, dbUser.Age);
            }
        }
Ejemplo n.º 2
0
        public void Provider()
        {
            var expected = "SELECT * FROM Users";

            var query  = _family.AsObjectQueryable <User>().ToQuery();
            var actual = query.ToString();

            AreEqual(expected, actual);
        }