public IEnumerable <T> GetList(object param, string sqlId = "GetList") { return(sqlMapper.Query <T>(new RequestContext { Scope = Scope, SqlId = sqlId, Request = param })); }
public override IEnumerable <T_Entity> Query() { var list = _sqlMapper.Query <T_Entity>(new RequestContext { Scope = "Entity", SqlId = "Query", Request = new { Taken = QUERY_TAKEN } }); return(list); }
public void Query_ReadDb2() { var result = _sqlMapper.Query <T_Entity>(new RequestContext { Scope = Scope, SqlId = "Query_ReadDb2" }); }
public void QueryBySql() { RequestContext context = new RequestContext { RealSql = "Select Top(@Taken) T.* From T_Entity T With(NoLock);", Request = new { Taken = 10 } }; var list = _sqlMapper.Query <T_Entity>(context); }
public void Des() { RequestContext context = new RequestContext { Scope = Scope, SqlId = "Query", Request = new { Taken = 10 } }; var list = _smartSqlMapper.Query <T_Entity>(context); }
public static IEnumerable <T> Query <T>(this ISmartSqlMapper sqlMapper, string fullSqlId, dynamic @params, DataSourceChoice sourceChoice) { EnsurePoint(ref fullSqlId); return(sqlMapper.Query <T>(new RequestContext() { Scope = fullSqlId.Split('.')[0], SqlId = fullSqlId.Split('.')[1], Request = @params }, sourceChoice)); }
public IEnumerable <T> Query <T>(RequestContext context) { return(MapperInstance.Query <T>(context)); }
public IEnumerable <T> Query <T>(RequestContext context) { return(SqlMapper.Query <T>(context)); }