Use LINQ and Reflection to Find Matching Properties

As a side product of some experiments I wrote simple LINQ query that matches properties of two objects and returns these properties as list. The code I wrote is pretty simple and I packed it for you as method. C# public IList GetMatchingProperties(object source, object target) { if (source == null) throw new ArgumentNullException(“source”); if [...]

Share

Read Users' Comments (0)

Why You Need to Know LINQ to XML

In .NET 3.5, the primary device for general processing of XML is LINQ To XML. This provides a lightweight, LINQ-friendly DOM along with a set of query operators. In SiIlverlight, this is your only choice – XmlDocument and related classes are not supported. Even without its LINQ support, the LINQ To XML DOM is valuable [...]

Share

Tags: , , , ,

Read Users' Comments (0)

How to Use Stored Procedures with LINQ to SQL [Video]

This video, courtesy of Microsoft’s ASP.NET video series, provides an example of using LINQ to SQL with stored procedures.

Share

Tags: , ,

Read Users' Comments (0)

Redesign

I’m working on redesigning the site. I’ve tried to put redirects up for every page that has moved (I moved from BlogEngine.NET to WordPress, so the files are named differently). If you see any missing images or files, please let me know. Thanks.

Share

Read Users' Comments (0)

How to Debug LINQ Queries

Debugging LINQ queries can be problematic.  One of the reasons is that quite often, you write a large query as a single expression, and you can’t set a breakpoint mid-expression.  Writing large queries in expression context is particularly powerful when using functional construction to form XML (or using the strongly typed DOM in Open XML [...]

Share

Read Users' Comments (0)

How to Randomly Reorder a List With LINQ

There are many times when we need to randomly sort a list or array. An example might be if you had a list of advertisements to display on your website, and need to randomly sort the list so the ads appear in random order. Another example might be if you have a card game, you [...]

Share

Read Users' Comments (0)