I started working on data access code for the Keyword class. I initially added LINQ mappings to the Keyword class, created a typed datacontext, and wrote a couple query methods using LINQ. It's pretty neat.
Once I got to the 'Update' method, I realized that LINQ-to-SQL doesn't have a specific 'update' method; as I understand it changes to the object's properties are automatically persisted when the datacontext 'updates' everything. There didn't seem to be a way to selectively update individual objects.
I was eager to use LINQ to SQL, but as I read up on it to see how I could best use it for the NyMPH project it became apparent that LINQ to SQL wasn't going to be developed further by Microsoft.
As cool as LINQ seems to be, I decided to stick with typed datasets and SQL queries. This will make object/relational mapping a bit more work, but that's alright.
I also learned the built-in O/RM editor in Visual Studio 2008 doesn't work with SQL CE 3.5. That's a shame.
I've started adding persistence methods to the KeywordFactory class (poorly named; I'll probably change it later). Once I get into the rhythm of working with typed datasets for O/RM I'll probably streamline it and use it as a basis for the other domain classes.
Wednesday, September 23, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment