示例#1
0
        public void LinqInsertSimple()
        {
            NKnife.Storages.SQL.Common.SuperSql.DefaultFormatter = FormatterLibrary.MsSql;

            var q1 = new Insert <Author>(false);

            q1.Columns(x => x.Append("a", "b", "c")).Values(x => x.Append("a", "b", "c"));
            string result = q1.GetSql();
            string sql    = "INSERT INTO [tab_authors]([a], [b], [c]) VALUES(a, b, c);";

            Assert.Equal(result, sql);
        }