Browse Source

Add Ado.GetLong

pull/12/MERGE
sunkaixuan 6 years ago
parent
commit
f992f3ba59
  1. 4
      Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs
  2. 1
      Src/Asp.Net/SqlSugar/Interface/IAdo.cs

4
Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs

@ -463,6 +463,10 @@ namespace SqlSugar
{
return GetInt(sql, this.GetParameters(parameters));
}
public virtual long GetLong(string sql, object parameters)
{
return Convert.ToInt64(GetScalar(sql, GetParameters(parameters)));
}
public virtual int GetInt(string sql, params SugarParameter[] parameters)
{
return GetScalar(sql, parameters).ObjToInt();

1
Src/Asp.Net/SqlSugar/Interface/IAdo.cs

@ -57,6 +57,7 @@ namespace SqlSugar
int GetInt(string sql, object pars);
int GetInt(string sql, params SugarParameter[] parameters);
int GetInt(string sql, List<SugarParameter> parameters);
int GetLong(string sql, object pars);
Double GetDouble(string sql, object parameters);
Double GetDouble(string sql, params SugarParameter[] parameters);
Double GetDouble(string sql, List<SugarParameter> parameters);

Loading…
Cancel
Save