Exemplo n.º 1
0
        public void Insert_Simple()
        {
            var generator = new InsertGenerator <NotUpdateObject>();

            Console.WriteLine(generator.GetSql());
            Assert.AreEqual("INSERT INTO (`Id`, `Long`) VALUES (?p0, ?p1);", generator.GetSql());
        }
Exemplo n.º 2
0
        public void Insert_Simple()
        {
            var generator = new InsertGenerator <SimpleObject>();

            Console.WriteLine(generator.GetSql());
            Assert.AreEqual("INSERT INTO `table_name`(`LongColumnName`, `SomeString`, `NullableLong`, `Guid`, `NullableGuid`, `IntBasedEnum`, `NullableIntBasedEnum`) VALUES (?p0, ?p1, ?p2, ?p3, ?p4, ?p5, ?p6); SELECT LAST_INSERT_ID();", generator.GetSql());
        }
Exemplo n.º 3
0
        public void Insert_Composite()
        {
            var generator = new InsertGenerator <CompositeIdSample>();

            Assert.AreEqual("INSERT INTO `composite_id_table`(`Id1`, `Id2`, `SomeValue`, `SomeDate`) VALUES (?p0, ?p1, ?p2, ?p3);", generator.GetSql());
        }