Posted to:
Community Blogs
by:
ASP.NET Weblogs
05-18-2008 2:27 AM |
In an interesting project where I'm giving a hand, we need to clone objects of a number of different types, perhaps surprisingly the CLR doesn't offer a general cloning method, of course you could use MemberwiseClone() but this is a protected method, so it can be invoked only from inside the class of the object being cloned, which makes it difficult to use it in a general method, besides, MemberWiseClone() does just a shallow copy and what we really need is a deep copy . There is a good reason for not having such a general method: object cloning is one of those problems which have a simple solution for simple scenarios but that resist a satisfactory solution for all the scenarios, for example the objects may have references to other...
|
Posted to:
Community Blogs
by:
ASP.NET Weblogs
05-17-2008 10:01 PM |
For those of you who have already put your feet into the waters of .NET 3.5 SP1, you have probably seen some amazing things with ADO.NET Data Services coupled to the Entity Framework. But that coupling may lead to blindness. Allow me to explain. [continue to article: Images as a Service with ADO.NET Data Services ] Read More...
|
Posted to:
Community Blogs
by:
ASP.NET Weblogs
05-17-2008 9:49 PM |
Debug ASP.NET Tips: What to gather to troubleshoot - part 3a - Crash revisited Using Process Explorer without an Internet Connection .NET Fast LZW Compression Using Binary Tree Getting Image Metadata with C# Web Javascript Tutorial - Continuous Pagination 20 Useful Tools to Make Web Development More Efficient Mojax - a mobile Ajax application framework Other Request/Response Testing with Windows PowerShell What Determines High Quality Code? Writing code that you’re proud of Read More...
|
Posted to:
Community Blogs
by:
ASP.NET Weblogs
05-17-2008 9:01 PM |
Eli Lopian, Typemock CEO and awesome Coder, just created a nice little API wrapper around Typemock Isolator that would allow a very simple and readable "Swapping" effect between classes. It would allow you to write code like this: [ Test ] public void SwapStatic_CallsFake () { Swap . StaticCalls < TypeA , TypeB > (); Assert . AreEqual ( 2 , TypeA . StaticReturnOne ()); Swap . Rollback (); } ...
|
Posted to:
Community Blogs
by:
CodeBetter.Com - Stuff you need to Code Better!
05-17-2008 8:42 PM |
I've prepared dozens of articles and presentations on the Entity Framework over the past year and a half and the questions always start with "Why would I want to use this instead of XYZ?" LINQ to SQL, a variety of ORM tools, straight up ADO.NET, custom data layers, CSLA.NET and this list goes on and on. This is a great questions and I was glad to see Danny Simons of Microsoft address this today on his blog. Danny mentions the differences between the Entity Framework and a few of these alternatives and specifically points out situations where they don't follow the same music. The differences between the choices is outline well in Danny's post. However the key point I like to stress is what Danny calls out in the last paragraph...
|
Posted to:
Community Blogs
by:
Sahil Malik - blah.winsmarts.com
05-17-2008 5:47 PM |
.. this post will self destruct in 48 hours I was being overrun by spammers, so I put a captcha on my contact page. For those who have my email addy, or are on my facebook - would you mind giving it a whirr? http://www.winsmarts.com/Contact.aspx Thanks! Read More...
|
Posted to:
Community Blogs
by:
AzamSharp
05-17-2008 1:57 PM |
The DataContext is an object representation of the database. It is responsible for all the operations performed on the database. One of the biggest issues when working with LINQ to SQL is the life time of an object when part of the DataContext. The DataContext is designed in a way that it will only handle the objects that were created by it. Although you can attach objects of one DataContext to a different DataContext but when you do this all hell breaks loose. Let's take a look at the example below where I am using a DepartmentRepository class to get the Department by Id. public static tblDepartment GetDepartment(int id) { using (VirtualRoomDBDataContext dc = new VirtualRoomDBDataContext()) { var department = (from d in dc.tblDepartments...
|
Posted to:
Community Blogs
by:
Steven Smith
05-17-2008 1:31 PM |
Doug Seven of Microsoft is hosting a party at Howl at the Moon during TechEd on June 3rd. He has some details on his blog and the party will include (and require for admission) a rubber duck competition. You'll need to pick up your duck for admission at the Teched Technical Learning Center at the Developer Tools & Languages information desk. One duck will admit two people so bring a friend! Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it! Read More...
|
Posted to:
Community Blogs
by:
ASP.NET Weblogs
05-17-2008 11:39 AM |
Enterprise Library is a collection of application blocks intended for use by developers who build complex, enterprise-level applications. Enterprise Library is used when building applications that are typically to be deployed widely and to interoperate with other applications and systems. In addition, they generally have strict security, reliability, and performance requirements. The goals of Enterprise Library are the following: Consistency . All Enterprise Library application blocks feature consistent design patterns and implementation approaches. Extensibility . All application blocks include defined extensibility points that allow developers to customize the behavior of the application blocks by adding their own code. Ease of use. Enterprise...
|
Posted to:
Community Blogs
by:
ASP.NET Weblogs
05-17-2008 8:36 AM |
First, if you are are developing exclusively ASP.NET 2.0+ applications, sorry, there is nothing interesting for you in this post. Second, if you are involved in some ASP.NET 1.1 projects and have no plans to install new development environment, then, sorry again, there is probably no reason for you to read on either. Ok, I've done all I could to warn you against reading it. Don't blame me for wasting you time, because I am going to start from the very beginning. One of my current projects is ASP.NET 1.1 Web Application. It is already released and rather stable. And yesterday I got new development machine on my workplace and migrated all my data to it. .NET Frameworks 1.1, 2.0, 3.0, 3.5 were preinstalled before I first logged in (thanks...
|