Here is an example LINQ query that populates a gridview:
DCMS.net.LINQClasses.DCMSDataClassesDataContext db = new DCMS.net.LINQClasses.DCMSDataClassesDataContext();
var query = from content in db.Contents
where content.resourceID == Convert.ToInt32(HttpContext.Current.Cache.Get("FAMILY_RESOURCEID"))
select new
{
content.contentID,
content.resourceID,
content.contentName,
content.contentLastName,
content.contentFileName,
content.contentDetails,
content.contentModDate,
content.contentImage1
};
rgFamily.DataSource = query;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment