linq
9 posts in this category
- C#: Remove line from textfileWith the following code you can remove a line from a textfile web.config . If the string is within a line the line will be removed.Jan 26, 20101 min read
- LINQ: Creating a if statement in Linq queryA lot of times I need to check a statement within my LINQ query and I wish there was a possibility of a IF statement within LINQ. The following code is the…Jul 30, 20092 min read
- Linq to Xml: Generate Google Sitemap with sitemap-protocolIn this example I will generate a XML site map that complies with the sitemap protocol XML schema. This example will give the following output: To keep the…Jul 8, 20091 min read
- Linq Casting: ToDictionary()In this post I will give an example how to cast a GenericList to Dictionary. This example will use the following Blogger class. The example will cast a…Jun 23, 20092 min read
- WCF webservice error with DBML objectsWhen deploying a WCF webservice for a Silverligh application I got the following error: As you can see from the error you need to add the \ Serializable\…May 7, 20091 min read
- Linq to Sql: Retrieve properties from related data (LoadWith)You have to specify which related data you want to retrieve from a object so you can access them outside the Linq data context. You can achieve this by using…Jan 15, 20091 min read
- Convert XmlElement to XElement (Extension Method)I was using some web services that returned there values in an XmlElement. I needed to convert this XmlElement to something that I can use with LINQ. I…Dec 8, 20081 min read
- Load rss (xml) with Linq to XML on medium trust hostingFor a new project I needed to implement show data from RSS. The site will be hosted on a shared hosting environment with medium trust. I load the rss with…Nov 26, 20081 min read
- Linq to Sql: Change connectionstring to load from Web.configUpdate 20 may 2009: New easy solution Set the Connection > Application Settings property True. This will generate a connection string in your app.config.…Sep 2, 20081 min read