internal SqlResult Result <T>(SqlServerCompiler compiler, string primaryKeyName = "id") { SqlResult result = null; if (typeof(T) == typeof(int)) { result = compiler.CompileWithLastIdToInt(this); } if (typeof(T) == typeof(long)) { result = compiler.CompileWithLastIdToLong(this); } if (typeof(T) == typeof(Guid)) { result = compiler.CompileWithLastIdToGuid(this, primaryKeyName); } return(result); }