|
-
Apr 8th, 2009, 05:53 AM
#1
Thread Starter
Not NoteMe
[RESOLVED] Using LINQ with a changing SQL database
I'm planning on using LINQ for the DAL, replacing sql connections etc. I've been reading up and it seems to rely on generated classes which are generated by looking at the makeup of a database.
Lets say that i have a table with a field that is not used any more, but is still in the table when i generate the LINQ classes. I then build my application, which doesn't make use of this field, but it is in the generated class.
Once the application's been deployed we refactor the database a bit, and remove this unused field. Would the app break if i don't re-generate the classes and re-deploy?
Likewise, is it easy to add a database field, and re-generate the class so it can be used in the app?
Cheers for any help!
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
Apr 8th, 2009, 06:03 AM
#2
Re: Using LINQ with a changing SQL database
 Originally Posted by SLH
I'm planning on using LINQ for the DAL, replacing sql connections etc. I've been reading up and it seems to rely on generated classes which are generated by looking at the makeup of a database.
Lets say that i have a table with a field that is not used any more, but is still in the table when i generate the LINQ classes. I then build my application, which doesn't make use of this field, but it is in the generated class.
Once the application's been deployed we refactor the database a bit, and remove this unused field. Would the app break if i don't re-generate the classes and re-deploy?
Likewise, is it easy to add a database field, and re-generate the class so it can be used in the app?
Cheers for any help!
Hi,
Yes, I believe it would break, Even if you manage to get away with it its very easy with LINQ to re-generate the classes' its all done behind the scenes and will involve you dragging and dropping on a window 
Hope that provides some insight.
-
Apr 9th, 2009, 06:18 AM
#3
Thread Starter
Not NoteMe
Re: Using LINQ with a changing SQL database
Cheers for the reply Pino.
Shame i'd need to go through any apps and re-deploy if we change something like this.
Guess it's to be expected though and not a big deal.
I'll mark this resolved, unless anyone has anything else to add.
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|