TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
scampercat
NA
189
0
C# working with linq
Jul 8 2012 12:23 PM
I am asking this question since I would like to know what is the best method of coding in a C # 2010 web form page that I just wrote. I read somewhere that everytime you need a datacontext object, you should create it. There was no reference also to removing the datacontext object.
Thus on the current web form page that I am using that connects to a sql server 2008 r2 database, I am doing the following:
1. I never remove the AttDataContext from memory.
2. On the same web page, I am referring to the same linq to sql *.dbml file. However depending upon what I user clicks on, I have the following 3 datacontext objects:
a. AttDataContext,
b. Att2DataContext,
c. Att3DataContext.
Can you tell me if the above if a good idea or not? If not, can you tell me how I should use the same data context object on the same web form page?
Reply
Answers (
0
)
What does 'default' mean in this context?
App wont save inline images,, thy load and del on re-opening of the rtf