Friday, November 27, 2009

Linq Use

public IQueryable BindQualificationDetail(int startRowIndex, int maximumRows)
{
var qulaificationTypes = from QD in Common.dataContext.QualificationDetails
where QD.UpdaterRef.Equals(User.Identity.Name)
orderby QD.UpdatedOn descending
select new
{
QD.ProfileID,
QD.QualificationDetails,
QD.UpdaterRef
};
ViewState["BindQualificationDetailRows"] = qulaificationTypes.Count();
return qulaificationTypes.Skip(startRowIndex).Take(maximumRows);
}
public int GetQualificationDetailCount()
{
return (int.Parse(ViewState["BindQualificationDetailRows"].ToString()));
}

No comments:

Post a Comment