Geeks With Blogs
Andrew Siemer's Blog Enterprise Web Applications, ASP.NET MVC, C#, SQL Server, Architecture, & Writing February 2008 Entries
Converting a System.Data.Linq.Binary (or timestamp) to a string and back again to avoid LINQ concurrency issues
I have been working on getting around the concurrency issues that LINQ has while working with disconnected DataContext's in an nTier environment. I currently have a Timestamp field in all of my tables to act as a row version number to help LINQ keep track of what is going on with my data. Up to this point I haven't had any issues as I have been working with objects that were either stored in session/cache as whole objects or I have been reconstituting the object from a new DataContext prior to updating ......

Posted On Monday, February 11, 2008 12:04 PM

LINQ .First() method throws an error if there are no records!
Egad! So I have used the .First() method in many of my LINQ queries to make sure that my query only returns one record. I thought this would be a great way to insure isolation of one record. Very similar to a TOP 1 statement in SQL. However, there is an issue with this concept. If your TOP 1 SQL statement doesn't find any records it returns nothing. I guess I sort of hoped that the .First() method would do something similar - say return NULL or something like that. It doesn't! Instead it throws an ......

Posted On Wednesday, February 6, 2008 3:01 PM

LINQ to SQL - Implementing the Repository pattern
I have been working for the past few days to try and figure out how to get LINQ to SQL integrated into my normal nTier environment. I have also been trying to follow along with the general principles of Domain Driven Design but am finding that there are some deficiencies in the current LINQ to SQL implementation that force a few restrictions on how I do things. Let's first look at some of the restrictions Disconnected DataContext My understanding of the LINQ to SQL DataContext is that it prefers ......

Posted On Tuesday, February 5, 2008 2:52 PM

Windows Live Writer - know of a better blog authoring tool?
Up until today I have always made my posts via the web interface that is provided to me at the geekswithblogs.net site. One of my new years resolutions was that I would start to blog more with better and more article oriented content. I have come to an understanding with myself that if I want to do this I will need to find a way that is more efficient with regards to writing my blog posts. Something more WORD like would be great! This has led me to this application - Windows Live Writer. It seems ......

Posted On Tuesday, February 5, 2008 11:40 AM

ASP.NET MVC - opinions?
Hello all! I find myself looking at design patterns to see if there is anything new floating about. Of course the new MVC framework keeps popping up everywhere. While I have been aware that MS released the new MVC framework for ASP.NET a while ago, each time I have read about it I have found myself shying away from it in favor of MVP. I primarily didn't like the concept of ViewState being removed or the fact that we had to go back to the old ways of tossing variables into the sky via a post or get ......

Posted On Tuesday, February 5, 2008 11:09 AM

Copyright © Andrew Siemer - www.andrewsiemer.com | Powered by: GeeksWithBlogs.net