Unity and ado.net entity data model

Jun 15, 2010 at 6:57 PM


I'm a Java/Flex developer trying C#, WPF (with mvvm) and ADO.Net data model.

I would like to know if the way I'm registering the data model (created using the VS2010 wizard) in Unity is correct. The application is working but I'd like to be sure :-)

I have the following code in my unity.config :

<register type="DBEntities">
  <lifetime type="singleton" />

 DBEntities is the data model.

And I'm injecting this instance in many services (for business operations) which are then injected in ViewModels.

Am I wrong or does it seems correct ?


Thanks a lot