public void ExecuteScalar() { RequestContext context = new RequestContext { Scope = Scope, SqlId = "GetRecord" }; var total = _sqlMapper.ExecuteScalar <long>(context); }
public void ExecuteScalar() { RequestContext context = new RequestContext { Scope = Scope, SqlId = "GetRecord", Request = new { FLongs = new long[] { 1, 2, 3 } } }; var total = _sqlMapper.ExecuteScalar <long?>(context); }
public int GetRecord(object param, string sqlId = "GetRecord") { return(sqlMapper.ExecuteScalar <int>(new RequestContext { Scope = Scope, SqlId = sqlId, Request = param })); }
//[Benchmark] public override long Insert() { return(_sqlMapper.ExecuteScalar <long>(new RequestContext { Scope = "Entity", SqlId = "Insert", Request = GetInsertEntity() })); }
public void ExecuteScalar_N_HasVal() { var result = _sqlMapper.ExecuteScalar <DateTime?>(new RequestContext { Scope = Scope, RealSql = "Select GetDate();" }); }
public static T ExecuteScalar <T>(this ISmartSqlMapper sqlMapper, string fullSqlId, dynamic @params) { EnsurePoint(ref fullSqlId); return(sqlMapper.ExecuteScalar <T>(new RequestContext() { Scope = fullSqlId.Split('.')[0], SqlId = fullSqlId.Split('.')[1], Request = @params })); }
public T ExecuteScalar <T>(RequestContext context) { return(MapperInstance.ExecuteScalar <T>(context)); }
public T ExecuteScalar <T>(RequestContext context) { return(SqlMapper.ExecuteScalar <T>(context)); }