public FindContext(string ConnectionString, DBType DBType) { _ConnectionString = ConnectionString; dbhelper = new DBHelper(_ConnectionString, DBType); sqlstring = new Context.FindSqlString <T>(); jss = new JavaScriptSerializer(); }
public DataTable Find <M>(M entity, string OrderBy) where M : BaseModel, new() { sqlstring = new Context.FindSqlString <T>(); sqlstring.OrderBy = OrderBy; var sql = this.GetSql(entity); return(dbhelper.ExecuteDataset(sql)); }
public List <M> FindToList <M>(M entity, string OrderBy) where M : BaseModel, new() { sqlstring = new Context.FindSqlString <T>(); sqlstring.OrderBy = OrderBy; var sql = this.GetSql(entity); var dt = dbhelper.ExecuteDataset(sql); return(this.FindToList <M>(dt)); }