Mvp View knows Model

Posted by userbb on Stack Overflow See other posts from Stack Overflow or by userbb
Published on 2012-10-22T16:49:32Z Indexed on 2012/10/22 17:00 UTC
Read the original article Hit count: 199

Filed under:
|
|

I'm trying to use MVP and I notice that my View must know Model that should not happen in MVP I presume.

here is example:

public partial class TestForm : Form, ITestPresenter
{
    public void LoadList(IEnumerable<AppSignature> data)
    {
        testPresenterBindingSource.DataSource = data;
    }
}

public interface ITestPresenter
{
    event EventHandler<EventArgs> Load;
    void LoadList(IEnumerable<AppSignature> data);
}

and the problem is that in TestForm I need reference to AppSignature. In all tutorials I saw, there are some simple examples like public void LoadList(IEnumerable<String> data) where there is no need reference to model. But how i.e DataGridView can publish current row data?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about winforms