public void StatementBuilder_SimpleObject_Should_Insert_IgnoreIdentity() { var expected = "insert into SIMPLE_OBJECTS ( name ) values ( @Name ) select ident_current('dbo.SIMPLE_OBJECTS')"; var sql = StatementBuilder.InsertOne <SimpleObject>(); AssertSql(sql, expected); }
public void StatementBuilder_ComplexObject_Should_Insert_IncludePrimaryKey() { var expected = "insert into COMPLEX_OBJECT ( parent_id, this_id, Name ) values ( @ParentID, @ThisID, @Name )"; var sql = StatementBuilder.InsertOne <ComplexObject>(); AssertSql(sql, expected); }