LINQ to SQL Web Application Best Practices
Posted
by derek
on Stack Overflow
See other posts from Stack Overflow
or by derek
Published on 2010-05-07T00:53:18Z
Indexed on
2010/05/07
0:58 UTC
Read the original article
Hit count: 344
ASP.NET
|linq-to-sql
In my experience building web applications, I've always used a n-tier approach. A DAL that gets data from the db and populates the objects, and BLL that gets objects from the DAL and performs any business logic required on them, and the website that gets it's display data from the BLL.
I've recently started learning LINQ, and most of the examples show the queries occurring right from the Web Application code-behinds(it's possible that I've only seen overly simplified examples). In the n-tier architectures, this was always seen as a big no-no.
I'm a bit unsure of how to architect a new Web Application. I've been using the Server Explorer and dbml designer in VS2008 to create the dbml and object relationships. It seems a little unclear to me if the dbml would be considered the DAL layer, if the website should call methods within a BLL, which then would do the LINQ queries, etc.
What are some general architecture best practices, or approaches to creating a Web Application solution using LINQ to SQL?
© Stack Overflow or respective owner