Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Entity Framework MVP Pattern problem

$
0
0

Hi, 

I'm currently developing a software using the MVP pattern and I need to ask the common practice regarding my concerns. 

This is my scenario:

I understand that the View must not know about the Model. So in order to populate the Datagridview on my Form, I use a Datatable property like this:

public DataTable Orders
{
   set { dataGridView1.Datasource = value; }
}

And in my presenter, I transform the ICollection<Orders> to a Datatable (I created a code for this) and pass it to the View for consumption. My problem is, how can I update the ICollection<Orders> objects in my presenter when the user modify the value in my DataGridView.

Am I doing MVP the right way or is there another method?

Please help, thank you in advance.


Viewing all articles
Browse latest Browse all 31927

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>