I'm trying to write a method, that would give, top 10 records and also total no. of records, from the table.
public void GetData(out IEnumerable<tblCountry> iList, out int rowCount)
{
iList = DBContext.tblCountries.Where(c=>c.Id > 0).Take(10);
rowCount = DBContext.tblCountries.Where(c=>c.Id > 0).Count();
}
But,I am unable to figure out how to call this function and access the output parameters
objDAL.GetData(//what should come here, out int rcount);
Is there a better approach.
using c#, entity framework