Wednesday, 19 December 2012

Create a DDD Solution


Starting a New Solution

  • Create a Blank Solution
  • Add a Core Class Library Project
  • Add an Infrastructure Class Library Project
  • Add your UI project (Console, WinForms, WPF, ASP.NET MVC)
  • Add references to Core from Infrastructure and UI 
  • Add a reference to Infrastructure from UI

  • Add a Controller, View
  • Add an Interface <IMyInterface> (new folder "Interfaces" in Core) with a method
  • Implement the Interface in Infrastructure (in a class <MyInterface>) with the method
  • In the controller:
  • Add the private field of the <IMyInterface>
  • Add the constructor with <IMyInterface> as parameter
  • Add the constrcutor without parameter to add the parameter
  • In the control, call the method and show the result to the view



No comments:

Post a Comment