BuildSelectInsertIdSqlQuery() public method

public BuildSelectInsertIdSqlQuery ( IObjectInfo objectInfo ) : SqlQuery
objectInfo IObjectInfo
return SqlQuery
        public void BuildSelectInsertIdSqlQueryThrowsArgumentNullExceptionForNullObjectInfo()
        {
            var sqlDialect = new MsSql2012Dialect();

            var exception = Assert.Throws<ArgumentNullException>(
                () => sqlDialect.BuildSelectInsertIdSqlQuery(null));

            Assert.Equal("objectInfo", exception.ParamName);
        }
        public void BuildSelectInsertIdSqlQueryForIdentifierStrategySequence()
        {
            ObjectInfo.MappingConvention = new ConventionMappingConvention(
                UnitTest.GetConventionMappingSettings(IdentifierStrategy.Sequence));

            var sqlDialect = new MsSql2012Dialect();

            var sqlQuery = sqlDialect.BuildSelectInsertIdSqlQuery(ObjectInfo.For(typeof(Customer)));

            Assert.Equal("SELECT @@id", sqlQuery.CommandText);
            Assert.Equal(0, sqlQuery.Arguments.Count);
        }