Geeks With Blogs

News

Currently Reading

CLR via C#m
Under The Influence(of code) Abhijeet Patel's blog March 2009 Entries
LINQ to XML on assembly embedded XML files
LINQ to XML rocks. I use it pretty much day in day out to read mock up data from XML files for prototyping. Today I needed a way to work with an XML file that was embedded in an assembly as an Embedded Resource. Following are the contents of the file: <Users> <User ID="1" Name="Jim"/> <User ID="1" Name="Jon"/> <User ID="1" Name="jack"/> <User ID="1" Name="Matt"/> </Users> LINQ to XML makes working with this very easy. public static XDocument GetDocument(string ......

Posted On Tuesday, March 31, 2009 9:57 PM

Performing multiple Asynchronous Actions for long running operations
The Action delegate in .NET is pretty handy when you need to invoke a method that takes no arguments. You assign the method name or an anonymous delegate/lambda to an Action delegate variable and just call the delegate variable to have your method invoked. But, what if you needed to invoke multiple actions simultaneously or wait for all actions to complete before the main thread can proceed? Maybe these actions are responsible for pre-fetching data from a service that the main thread requires or ......

Posted On Sunday, March 29, 2009 5:19 PM

Object equality in Except and other set operators in LINQ
Here is an interesting issue I noticed when using the Except extension method. I have list of users from which I want to exclude some users: The list of users is coming from an XML file: <Users> <User id="1" name="Jack"/> <User id="2" name="Jim"/> <User id="3" name="Joe"/> <User id="4" name="James"/> <User id="5" name="Tom"/> <User id="6" name="Matt"/> <User id="7" name="Jon"/> <User id="8" name="Jill"/> </Users> The code goes like this: ......

Posted On Saturday, March 28, 2009 4:23 PM

Some Extension Methods for working with the ADO.NET Entity Framework
Recently I've started working more and more with the ADO.NET Entity framework and I must say that I like it a lot. There are folks who absolutely love EDM and folks that think its really evil. It's still a v1.0 product and I treat it as such. The designer does leave a lot to be desired.A lot of bells and whistles will be added to the VS 2010 release to address a lot of the designer "desirables". It's not been an easy buy in at work for adopting EDM, but my team has been among the first to have adopted ......

Posted On Thursday, March 5, 2009 7:43 PM

Copyright © Abhijeet Patel | Powered by: GeeksWithBlogs.net