views:

300

answers:

4

This project is the probable first step in migrating a large CMS from Classic ASP to .Net. I'd like to use LINQ for querying the DB.

Does anyone have any ideas for strategies to make this happen? I understand this is a vague question at this point, but I'm gathering information.

Thanks,

KevDog

A: 

You might have to go all in with ASP.NET. I don't think you can really separate the two.

craigmoliver
+3  A: 

Put your data access in an ASP.NET/WCF web service and use Linq to SQL there. Then, consume the service in your classic ASP using a SoapClient.

Related articles:

Corbin March
A: 

To LINQ, you'd need to write a LINQ interpreter and that would most likely take you a very, very long time to do accurately.

I see a lot of migration plans that, like this, try to tether antiquated technology to sleek new solution and they always end in pain, a lot of wasted time and often misery with a side of manic depression.

Stop touching the old code. Leave it. Focus all your energy on porting what needs to be ported. In terms of data, again, leave the old database alone, rewrite your database and write a migration script that can programmatically copy all the data across when the time is ready.

When you think you're done, copy the current database across, test the bells off it for a week or so, then refresh off the old DB again to make sure you don't lose any data.

Then quietly take the old system out the back and shoot it.

Oli
A: 

You can't really integrate LINQ into classic ASP unless you write your own interpreter for it, but then what's the point. Doing that would be the same as writing your own programming language. As Corbin suggests, try migrating the data access layer to .NET where you can then leverage it from classic ASP via a web service or something. You don't have to re-write everything all at once, but you will have to pull your db code out and re-write that in .NET if you want to leverage LINQ. Good luck. Here's hoping that your db code was separated enough to make this relatively painless.

Notorious2tall