varr=awaitconnection.QueryAsync($"SELECT FIRST 1 {keyName} ID FROM {tableName} ORDER BY {keyName} DESC",transaction:transaction,commandTimeout:commandTimeout);
varr=awaitconnection.QueryAsync($"SELECT FIRST 1 {keyName} ID FROM {tableName} ORDER BY {keyName} DESC",transaction:transaction,commandTimeout:commandTimeout).ConfigureAwait(false);
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id",AutoSync=AutoSync.OnInsert,DbType="Int NOT NULL IDENTITY",IsPrimaryKey=true,IsDbGenerated=true)]
publicintId
{
get
{
returnthis._Id;
}
set
{
if((this._Id!=value))
{
this.OnIdChanging(value);
this.SendPropertyChanging();
this._Id=value;
this.SendPropertyChanged("Id");
this.OnIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Text",DbType="VarChar(MAX) NOT NULL",CanBeNull=false)]
publicstringText
{
get
{
returnthis._Text;
}
set
{
if((this._Text!=value))
{
this.OnTextChanging(value);
this.SendPropertyChanging();
this._Text=value;
this.SendPropertyChanged("Text");
this.OnTextChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreationDate",DbType="DateTime NOT NULL")]
publicSystem.DateTimeCreationDate
{
get
{
returnthis._CreationDate;
}
set
{
if((this._CreationDate!=value))
{
this.OnCreationDateChanging(value);
this.SendPropertyChanging();
this._CreationDate=value;
this.SendPropertyChanged("CreationDate");
this.OnCreationDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastChangeDate",DbType="DateTime NOT NULL")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id",AutoSync=AutoSync.OnInsert,DbType="Int NOT NULL IDENTITY",IsPrimaryKey=true,IsDbGenerated=true)]
publicintId
{
get
{
returnthis._Id;
}
set
{
if((this._Id!=value))
{
this.OnIdChanging(value);
this.SendPropertyChanging();
this._Id=value;
this.SendPropertyChanged("Id");
this.OnIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Text",DbType="VarChar(MAX) NOT NULL",CanBeNull=false)]
publicstringText
{
get
{
returnthis._Text;
}
set
{
if((this._Text!=value))
{
this.OnTextChanging(value);
this.SendPropertyChanging();
this._Text=value;
this.SendPropertyChanged("Text");
this.OnTextChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreationDate",DbType="DateTime NOT NULL")]
publicSystem.DateTimeCreationDate
{
get
{
returnthis._CreationDate;
}
set
{
if((this._CreationDate!=value))
{
this.OnCreationDateChanging(value);
this.SendPropertyChanging();
this._CreationDate=value;
this.SendPropertyChanged("CreationDate");
this.OnCreationDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastChangeDate",DbType="DateTime NOT NULL")]
varstr=awaitconnection.QueryFirstAsync<string>(newCommandDefinition("select 'abc' as [Value] union all select @txt",new{txt="def"})).ConfigureAwait(false);
varstr=awaitconnection.QueryFirstAsync<string>(newCommandDefinition("select 'abc' as [Value] union all select @txt",new{txt="def"})).ConfigureAwait(false);
Assert.Equal("abc",str);
}
...
...
@@ -39,7 +39,7 @@ public async Task TestBasicStringUsageQueryFirstAsyncDynamic()
varstr=awaitconnection.QueryFirstOrDefaultAsync<string>(newCommandDefinition("select null as [Value] union all select @txt",new{txt="def"})).ConfigureAwait(false);
varstr=awaitconnection.QueryFirstOrDefaultAsync<string>(newCommandDefinition("select null as [Value] union all select @txt",new{txt="def"})).ConfigureAwait(false);
Assert.Null(str);
}
...
...
@@ -165,7 +165,8 @@ public async Task TestMultiMapWithSplitAsync()