public void btnAccessor_Click(System.Object sender, System.EventArgs e) { //ExecuteSprocAccessor: Executes a stored procedure and returns the result as an enumerable of TResult. // The conversion from IDataRecord to TResult will be done for each property based on matching property name to column name. var list = db.ExecuteSprocAccessor <SampleData>("GetSampleData"); var results = from s in list where s.Name == "Test" orderby s.Value descending select s; //Note that we now have a list of objects dgvSampleData.DataSource = results.ToArray(); }