server control with lots of database interaction

S

Seb

I want to develop a server control which query a database several
times. The thing is I cant just include the result of a linq query as
a datasource since I need to query several times and work on the
results... and perhaps query some more.
Should I include a reference to my datacontext class?

I also want it to act a bit like asp:Login in the sense that it
creates a database if one isn't present or create the need tables if
one is.

Can someone point me in the right direct either by some hints or by a
url?

best regards,
seb
 
A

Alvin Bruney [ASP.NET MVP]

You shouldn't couple your control to the database. You should call into some
business layer instead. Let the business layer call into the database that
way you don't implement a brittle control that falls over dead when the
database schema changes etc.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Download OWC Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $15.00
Need a free copy of VSTS 2008 w/ MSDN Premium?
http://msmvps.com/blogs/alvin/Default.aspx
 
S

Seb

You shouldn't couple your control to the database. You should call into some
business layer instead. Let the business layer call into the database that
way you don't implement a brittle control that falls over dead when the
database schema changes etc.

Makes sense, thanks for the info.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top