November 18, 2011

Linq



IEnumerable Way


var results = SPContext.Current.Web.Lists["Some List"].Items.Cast().Where(item => item[SPBuiltInFieldId.Title].ToString() == "Title To Search");


foreach(SPListItem item in results)
{
//logic
}


Ling Way


List results = (from SPListItem item in listobject where item["Title"].ToString() == "blahblah" select item).ToList();


foreach(SPListItem item in results)
{
//logic
}

No comments:

SonarQube with Jenkins Setup using Docker Images

https://funnelgarden.com/sonarqube-jenkins-docker/  https://medium.com/@hakdogan/an-end-to-end-tutorial-to-continuous-integration-and-con...