Mahesh
Mahesh

Reputation: 1784

LINQ to SQL: What gives pain?

I decided to use LINQ to SQL in my personal project after hearing lots of goods. Is there any thing I need to taken care before start using it (during initial design)?

Upvotes: 0

Views: 374

Answers (4)

Amy B
Amy B

Reputation: 110071

If you're going to write data, you require primary keys (for tracking row identity across in-memory objects). These primary keys should be preferably single column.

Watch out for decimal precision and string length.

Watch out for any varchar(1) columns. these get mapped to a .Net char, which can't hold the empty string.

Upvotes: 0

JohnIdol
JohnIdol

Reputation: 50097

In my opinion the biggest downside of using LINQtoSQL is that if your database schema changes you need to re-generate your classes (and lose your code) unless you use some third-party tool to synch-up your DB model with you db schema.

Have a look at this question for further details.

Upvotes: 0

Sam Meldrum
Sam Meldrum

Reputation: 13991

EDIT Completely rewritten as earlier post was misleading - apologies.

There has been much rumour that Microsoft will not be taking Linq2Sql any further. Fuelled by an ADO.Net team blog post.

Following that there was much speculation on the blogs and on Stack Overflow about whether or not Microsoft were really discontinuing work on Linq2Sql.

If the technology works for you now and does all you need, then great. It may be that Entity Framework, or some other Data Access Model (nHibernate) will work better for you.

Upvotes: 0

Galwegian
Galwegian

Reputation: 42227

See What’s wrong with Linq to SQL?

Upvotes: 1

Related Questions