SyntaxHighlighter

Showing posts with label Linq. Show all posts
Showing posts with label Linq. Show all posts

Thursday, April 2, 2009

Limited Linq to Sql

I've been playing around (ie pulling my hair out) in my spare time over the last few weeks, trying to make Linq more loosely coupled with a UI and to extend its capabilities to allow for many-to-many table updates. I find it completely rediculous how intricate Ms has made all of this. Perhaps I'm missing the plot, but unless you're trying to do some really simple little application that requires little to no flexibility on the DB side of things, STAY AWAY FROM LINQ.

I wrote my own Linq a few years ago, but decided to give Ms Linq a chance and it hasn't really been smooth sailing. The most enjoyable part of the experience was dragging my tables into the dbml window and seeing VS create all the classes for me. The rest is a friggin nightmare.

I'm not about to give up the fight though, but I'm pretty distraught at the moment.

Wednesday, September 17, 2008

Linq Context.Add Renamded To

A number of Linq to Sql tutorials online are based on intial "Orcas" (now 3.5) release of the .Net Framework. A number of namechanges were made and I picked one up whilst learning Linq. Here's the error I received:
'System.Data.Linq.Table<Namespace>' does not contain a definition for 'Add' and no extension method
'Add' accepting a first argument of type 'System.Data.Linq.Table<Namespace>' could be found
(are you missing a using directive or an assembly reference?)

The context.Add methods was changed to context.InsertOnUpdate.