public void ExecuteScalar()
 {
     RequestContext context = new RequestContext
     {
         Scope = Scope,
         SqlId = "GetRecord"
     };
     var total = _sqlMapper.ExecuteScalar <long>(context);
 }
Exemple #2
0
 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);
 }
Exemple #3
0
 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()
     }));
 }
Exemple #5
0
 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
            }));
        }
Exemple #7
0
 public T ExecuteScalar <T>(RequestContext context)
 {
     return(MapperInstance.ExecuteScalar <T>(context));
 }
 public T ExecuteScalar <T>(RequestContext context)
 {
     return(SqlMapper.ExecuteScalar <T>(context));
 }