Beispiel #1
0
        public void To_String_Typed_Alias_With_Alias_Name()
        {
            IAlias <Person2> person = sql.Alias <Person2>("per");
            IFrom            from   = sql.From(person);

            Assert.Equal("FROM Person2 AS per", from.ToString());
        }
Beispiel #2
0
        public void To_String_With_Alias_Name()
        {
            IAlias person = sql.Alias("dbo.person", "per");
            IFrom  from   = sql.From(person);

            Assert.Equal("FROM dbo.person AS per", from.ToString());
        }
Beispiel #3
0
        public void To_String()
        {
            IAlias person = sql.Alias("dbo.person");
            IFrom  from   = sql.From(person);

            Assert.Equal("FROM dbo.person", from.ToString());
        }
Beispiel #4
0
        public void To_String_Subquery()
        {
            IAlias person = sql.Alias("person");
            IFrom  from   = sql.From(sql.RawQuery("Subquery"), person);

            Assert.Equal("FROM (Subquery) AS person", from.ToString());
        }
Beispiel #5
0
        public void To_String_Options()
        {
            IAlias person = sql.Alias("person");
            IFrom  from   = sql.From(person).Options(sql.Raw("WITH (NO LOCK)"));

            Assert.Equal("FROM person WITH (NO LOCK)", from.ToString());
        }
Beispiel #6
0
        public void To_String_Typed_Alias()
        {
            IAlias <Person> person = sql.Alias <Person>();
            IFrom           from   = sql.From(person);

            Assert.Equal("FROM Person AS person", from.ToString());
        }