background preloader

LinQ

Facebook Twitter

C# - Left Join in Linq and using the variable for other joins. 101 LINQ Samples in C# How to: Query Using LINQ to SharePoint. EntityList<Announcement> announcements = teamSite.GetList<Announcement>(“Announcements”) [ContentType(Name="Announcement", Id="0x0104")] public partial class Announcement { [Column(Name = "Title", FieldType = "Text")] public String Title { get; set; } } But a query can only refer to columns that are represented by properties in the content type class, so if only this minimum declaration is provided, your calling code could only refer to the Title field (column), as shown in this example. var excitingAnnouncements = from announcement in announcements where announcement.Title.EndsWith(“!”)

How to: Query Using LINQ to SharePoint

Select announcement;