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
bahare g
NA
68
0
IorderdQuaryable
Jan 8 2011 1:59 AM
hello my firends
i write a select method named slc in myclass. slc method return result from select of contact table. this method result is IorderdQueryable and i call this in my code-behind and i assign this result to a ListBox, i want to know how can i close my connection in my method ?does Iqueryable type close connetion automatically?
i use this code in slc method but it hase error
pubic cLass myclass
{
public IorderdQueryable<contactTbl> slc()
{
using(
DataContext
DataConextVar =
new
DataContext
(cnclass
.GetConnectionString(
"ConnectionString"
)))
{
var t=from b in DataConextVar.contactTbl select b;
return t;
}
please help me
}
Reply
Answers (
1
)
USING LOOKUP TABLES
initialize my label