-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
What steps will reproduce the problem?
public static List<T> GetPage<T>(Expression<Func<T, bool>> expression, Expression<Func<T, object>> orderBy, int pageSize, int pageNumber = 1) where T : new()
{
var connection = new SqlConnection("Data Source=10.0.0.6;Initial Catalog=Testt;Integrated Security=False;Persist Security Info=False;User ID=sa;Password=master;Connect Timeout=120;");
var query = new SqlLam<T>(expression);
query.OrderBy(orderBy);
query.QueryStringPage(pageSize, pageNumber);
var selectCommand = new SqlCommand(query.QueryString, connection);
foreach (var param in query.QueryParameters)
selectCommand.Parameters.AddWithValue(param.Key, param.Value);
connection.Open();
var result = selectCommand.ExecuteReader();
var premios = Extensions.Map<T>(result);
connection.Close();
return premios;
}
What is the expected output? What do you see instead?
List paginate
What version of the product are you using? On what operating system?
1.0.0.0
Please provide any additional information below.
Original issue reported on code.google.com by wagnerda...@gmail.com on 12 Mar 2014 at 6:29