I am working on a private project (C # / ASP.NET) which will use SQL from LINQ. Solution (So far) will be a webform project, namespace project (business logic) and a test project. I am still very early (in the design phase).
Is there a pattern for 3-level architecture? It seems that in this case DAL is completely useless; It seems that I should demonstrate the LINQ query directly from business logic.
It also happens to me that if I only keep a resident data content and pass it around, then I will only need an open connection. This will be an added benefit instead of a change in place instead of Granular. Any thoughts on that?
I found, but it seems that an incomplete picture is an in-depth article on this subject?
You can think of LINQ-to-SQL, because you put it, Directly "is not necessary to use.
Some popular L2S approaches are listed.
On our project, we do not want to cross the data reference, so we used a pattern similar to # 3 above the link (ambient data conttext, see below). There was some problem in it, but it worked quite well; At least for our web project. Environmental datacentext (currently using this) .net) as soon as the first call for datacentext. Then the same reference is used for the thread or request unless it is handled manually. This is done by accumulating the reference in the request / thread data store. The approach of this method is similar to that of a stable datacontext, however separation is provided for each thread and requests. It works really well in the aspen, yet, it is again suffering from some problems of stable references.
Problems with this pattern:
* References are available for manipulation at any level and it becomes very difficult to maintain the unit of work quickly * Portability across threads is very difficult. * The unit of work pattern is not transparent enough.