Print Page | Close Window

t4 template: Internals and interfaces

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2794
Printed Date: 25-Jan-2026 at 11:47am


Topic: t4 template: Internals and interfaces
Posted By: mantaray
Subject: t4 template: Internals and interfaces
Date Posted: 24-Jun-2011 at 3:31am
Hi there! We are in the process of testing DevForce for our system. Currently we are trying to determine if it is possible to place an interface layer between DevForce and our system - we need the data source to be completely separate from the system, which means that we only want to reference DevForce in the data provider assembly, NEVER in the application. This means that we need to add interfaces to the entity classes as well as making the entities and entity manager internal. Is this possible? It's a pity the t4 isn't "normal"... then these kinds of changes would be easy.



Replies:
Posted By: DenisK
Date Posted: 27-Jun-2011 at 2:16pm
Hi mantaray;

Yes, it's possible.

What you call an "interface layer", is what we call a "repository layer". We always recommend our customers to hide the DevForce details behind the repository layers. Here's a write up on how to do that with DevForce-Caliburn Framework. 

http://devforcecaliburn.codeplex.com/wikipage?title=The%20Data%20Repository&referringTitle=Documentation - http://devforcecaliburn.codeplex.com/wikipage?title=The%20Data%20Repository&referringTitle=Documentation

You can modify the entities access modifiers to internal in the EDMX designer. There's no need to make the EntityManager internal since as long as the entities are internal, they won't be accessible from the EntityManager outside the repository.

If you're interested, we have Professional Services team that can help you with guidance on best practices and architectural type questions.

Hope this helps.



Print Page | Close Window