3 layer design question, binding data to form
<p>I want to bind controls on form to a data from database, the binding happens in codebehind. </p>

<p>I want to use 3 layer pattern, DAL layer that will use Entity Framework, BLL that will use DAL to retrieve the data, and my form to display it.</p>

<p>Let's say there is an Entity object called Product with 3 properties: Name, Count, Price  </p>

<p>I want to bind them to 3 text boxes on the from.</p>

<p>from code behind I call BLL's method that will call DAL method to retrieve the needed entity object...</p>

<p>Here is the problem, in order to bind data on the form, form must "know" about this entityObject that returned by BLL.</p>

<p>So I could do this: </p>

<pre><code>DataAccessLayer.Product product = BusinessLogicLayer.GetProduct(someid);
textbox1.text=product.name; 
textbox2.text=product.price; 
....
</code></pre>

<p>But this breaks the 3-layer pattern!! 
How to be? Create a new object just to hold this data?</p>
