Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>To answer your questions:</p> <ul> <li><p><strong>Should I perform LINQ to SQL directly in my service/business layer or in a DAL in a repository method?</strong> LINQ to SQL specifically only makes sense if your database maps 1-to-1 with your business objects. In most enterprise situations that's not the case and <a href="http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx" rel="noreferrer">Entities</a> is more appropriate.</p> <p>That having been said, LINQ in general is highly appropriate to use directly in your business layer, because the LINQ provider (whether that is LINQ to SQL or something else) <em>is</em> your DAL. The benefit of LINQ is that it allows you to be much more flexible and expressive in your business layer than <code>DAL.GetBusinessEntityById(id)</code>, but the close-to-the-metal code which makes both LINQ and the traditional DAL code work are encapsulated away from you, having the same positive effect.</p></li> <li><p><strong>Do you believe we can truly use POCO (plain old CLR objects) when using LINQ to SQL?</strong> Without more specific info on your POCO problems regarding LINQ to SQL, it's difficult to say.</p></li> <li><p><strong>would you drop the 'model' facet for larger projects</strong> The MVC pattern in general is far more broad than a superficial look at ASP.NET MVC might imply. By definition, whatever you choose to use to connect to your data backing in your application becomes your model. If that is utilizing WCF or MQ to connect to an enterprise data cloud, so be it.</p></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload