New Posts New Posts RSS Feed: Reusing Domain Model in another app
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Reusing Domain Model in another app

 Post Reply Post Reply
Author
BillG View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
Post Options Post Options   Quote BillG Quote  Post ReplyReply Direct Link To This Post Topic: Reusing Domain Model in another app
    Posted: 14-Mar-2011 at 12:51pm
I am creating a WPF version of my Silverlight app. Is there an easy way to just move the Domain Model over to the new. Nothing changes. Can I just copy the directory over to my app and insert existing items or do I have to recreate it?
 
Bill
 
Back to Top
smi-mark View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 24-Feb-2009
Location: Dallas, Texas
Posts: 343
Post Options Post Options   Quote smi-mark Quote  Post ReplyReply Direct Link To This Post Posted: 14-Mar-2011 at 5:21pm
Hi Bill,

Just use the domain model you are using in the web project. If your edmx is currently in the web project, and not in it's own separate class library, then you will want to split it out.

This is how I typically structure it:

MyProjectWeb
MyProject.Model.Desktop (Project Namespace MyProject.Model)
MyProject.Model.SL (Project Namespace MyProject.Model)
MyProject (SL App)

The web has a reference to MyProject.Model.Desktop and the SL has a reference to MyProject.Model.SL.

In your WPF application, you can now simply add a reference to MyProject.Model.Desktop and you are done.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down