Esempio n. 1
0
        public void To_String_Subquery()
        {
            IAlias person = sql.Alias("person");
            IJoin  join   = sql.Left.Join(sql.RawQuery("Subquery"), person);

            Assert.Equal("LEFT JOIN (Subquery) AS person", join.ToString());
        }
Esempio n. 2
0
        public void To_String_Typed_Alias_With_Alias_Name()
        {
            IAlias <Person> person = sql.Alias <Person>("per");
            IJoin           join   = sql.Left.Join(person);

            Assert.Equal("LEFT JOIN Person AS per", join.ToString());
        }
Esempio n. 3
0
        public void To_String_With_Alias_Name()
        {
            IAlias person = sql.Alias("person", "per");
            IJoin  join   = sql.Left.Join(person);

            Assert.Equal("LEFT JOIN person AS per", join.ToString());
        }
Esempio n. 4
0
        public void To_String()
        {
            IAlias person = sql.Alias("dbo.person");
            IJoin  join   = sql.Left.Join(person);

            Assert.Equal("LEFT JOIN dbo.person", join.ToString());
        }
Esempio n. 5
0
        public void To_String_Typed_Alias()
        {
            IAlias <Person2> person = sql.Alias <Person2>();
            IJoin            join   = sql.Left.Join(person);

            Assert.Equal("LEFT JOIN Person2 AS person2", join.ToString());
        }
Esempio n. 6
0
        public void To_String_Options()
        {
            IAlias person = sql.Alias("person");
            IJoin  join   = sql.Left.Join(person)
                            .Options(sql.Raw("USE INDEX (myIndex)"));

            Assert.Equal("LEFT JOIN person USE INDEX (myIndex)", join.ToString());
        }