There is not much to write about. there is only one DDL read on the UI. then some of the baseclass in sysframework also have todo, which can be implemented according to your own taste. the focus of the demo is not to demonstrate too many details, but to express the entire architecture.
The SQL used in the database comes with the example Database: northwind
The data access layer uses nhib.pdf
Projects description:
Aspnetmvpdemoapp. dataaccess (data access layer)
Aspnetmvpdemoapp. dataaccess. Interface (data access interface)
Aspnetmvpdemoapp. Model (M in MVP)
Aspnetmvpdemoapp. Presenter (P in MVP)
Aspnetmvpdemoapp. View. Interface (V interface in MVP)
Aspnetmvpdemoapp. sysframework (system framework core layer)
Aspnetmvpdemoapp. Web (V in MVP)
Intention
1. Use the Inheritance Method of inhibernatebasedao-> nhibernatebasedao <t>-> somemodeldao to reuse public methods such as selectall () in each somemodeldao.
2. The nhibernatesessionmodule uses the httpmodule "filter" method to uniformly Process sessions on/off in Nhibernate; the start and commit of transactions. In this way, do not repeat these operations in each method in Dao.CodeImplementation.
3. using windsorcontainer (windsorcontainer is a control reversal container created on the basis of a microkernel, this microkernel can scan classes and try to find the object references and object dependencies used by these classes, then, provide the dependent information to the class .) Implement "auto-fill" for P of M and V to decouple high-level code.
But now the problem is: Add V to windsorcontainer and retrieve it from the container. You cannot directly use the UI control in V (null reference error ...),At present, this intent has not been implemented. Who knows how to solve it?
:
Http://download.csdn.net/detail/camelials/4841497
PS:
I mentioned the differences between MVC, MVP, and mvvp in a simple sentence in the previous article. The difference between them is too general, which may make everyone understand deeply, in addition, the question of MVC-> mvvm is very wide. My understanding is basic.
I want to find time to write an mvvm demo under WPF to explain it. The other party hasn't used WPF to write anything for a long time. It's a pity. Thank you for your attention.