Print Page | Close Window

differerent core models

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1202
Printed Date: 22-Sep-2025 at 12:46pm


Topic: differerent core models
Posted By: lars-erik
Subject: differerent core models
Date Posted: 06-Apr-2009 at 5:47am
I have just started looking at Devforce Silverlight, and there are a few things I need to clearify:
1) Let's say we have an interface ISelectableCustomer. Now let's say that our core model has a concrete entity called SelectableCustomer, this is a regular EF entity in visual studio. Now in some cases we want to substitute the SelectableCustomer with entities from a webservice (or WCF), we call this SelectableCustomerFromExternalService.
Is it possible to use ISelectableCustomer in our wpf project - and this projects knows nothing about our concrete entities ?
(We are using prism and unity today, so we would like to inject our model at startup)

2) Can nhibernate be used as the core model, but the wpf project only uses the ideablade entities ?

Could you give us some tuturials regarding 1) and 2)



Replies:
Posted By: kimj
Date Posted: 07-Apr-2009 at 6:16pm
1) There's nothing in DevForce Silverlight which will force your UI to be coded a certain way or be dependent upon the domain model.  So, writing a view to an interface should not itself be a problem, but it's up to you to determine how you back that interface with a concrete implementation at run time.  I'll add that DevForce supports service-backed entities as well as EF (database) backed entities so you could theoretically swap models based on the DevForce "data source key", but there are some limitations with service-backed entities at this time.
 
2) DevForce does not integrate with nHibernate and supports only Entity Framework generated models.



Print Page | Close Window