public void TestInsert() { var dapper = new DapperObject <Person>(); var instance = GetRandomPerson(); var insert = dapper.Insert(instance); Assert.AreEqual(insert, $"INSERT INTO PESSOA (ID, NAME, AGE) VALUES ({instance.Id}, '{instance.Name}', {instance.Age})"); }
public static string GetInsertSql <T>(this T model, DapperObjectOptions options = null) { var dapperObject = new DapperObject <T>(options); return(dapperObject.Insert(model)); }