Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The first question is somewhat open in nautre, and rather dependent on the controls you are using, and the design pattern (if any) that you are trying to adhere to. From a development perspective, if you are Unit Testing you should always consider seperation of concerns, and how tightly you want to bind your controls to your 'domain'. Is this an ASP.NET application?</p> <p>The second question is quite common, especially in enterprise scenarios where you have security concerns and serious DBAs (!). You CAN implement select stored procedures. I'd suggest reading the post <a href="http://www.robbagby.com/entity-framework/entity-framework-modeling-select-stored-procedures/" rel="nofollow noreferrer">found here</a>.</p> <p>As for the third question, again it is possible to use views in Entity Framework. There are several articles and pitfalls, I'd certainly check <a href="https://stackoverflow.com/questions/1234088/views-and-entity-framework">this article</a> first as well.</p> <p>2 and 3 really come down to the clients requirements. On my current project, we are using stored procedures for create, update and delete operations, whilst allowing direct select access on our tables as necessary. This is effective as it allows you to use the native power of EF and LINQ in terms of dynamic queries. Again, this suits our requirements, but may not suit yours!</p> <p><strong>EDIT</strong>:</p> <p>I just wanted to provide a couple more links regarding your last comment, as they deal more explicitly with EntityDataSource. The relevant SO article is <a href="https://stackoverflow.com/questions/717740/can-i-call-a-stored-procedure-from-an-entitydatasource">here</a>, and it links to a nice article <a href="http://blogs.microsoft.co.il/blogs/bursteg/archive/2007/12/17/ado-net-entity-framework-tools-stored-procedures.aspx" rel="nofollow noreferrer">here</a>, which should help you.</p> <p><strong>EDIT</strong>: </p> <p>One more option is to add a defining query to control how EF performs the select. See <a href="http://msdn.microsoft.com/en-us/library/cc982038.aspx" rel="nofollow noreferrer">here</a>.</p> <p>Nick.</p>
 

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