public async Task ExecuteScalarAsync() { RequestContext context = new RequestContext { Scope = Scope, SqlId = "GetRecord" }; var total = await _sqlMapper.ExecuteScalarAsync <long>(context); }
public static Task <T> ExecuteScalarAsync <T>(this ISmartSqlMapper sqlMapper, string fullSqlId, dynamic @params) { EnsurePoint(ref fullSqlId); return(sqlMapper.ExecuteScalarAsync <T>(new RequestContext() { Scope = fullSqlId.Split('.')[0], SqlId = fullSqlId.Split('.')[1], Request = @params })); }
public long ExecuteScalarAsync() { RequestContext context = new RequestContext { Scope = Scope, SqlId = "GetRecord" }; var total = _sqlMapper.ExecuteScalarAsync <long>(context).GetAwaiter().GetResult(); return(total); }
public async Task <long> ExecuteScalarAsync() { RequestContext context = new RequestContext { Scope = Scope, SqlId = "GetRecord", Request = new { FStrings = new string[] { "SmartSql", "SmartCode" } } }; var total = await _sqlMapper.ExecuteScalarAsync <long>(context); return(total); }
public Task <T> ExecuteScalarAsync <T>(RequestContext context) { return(MapperInstance.ExecuteScalarAsync <T>(context)); }
public Task <T> ExecuteScalarAsync <T>(RequestContext context) { return(SqlMapper.ExecuteScalarAsync <T>(context)); }