This project is read-only.

use interfaces in Model

Sep 9, 2011 at 1:43 PM

I plan to use interfaces instead of classes in model, so that I can mock them

I plan to generate interfaces from EF edmx with tt

Sep 10, 2011 at 12:05 PM

Done in changeSet 8176

also generate mock implementations of thease interface using tt in DAL.Mock project

Sep 14, 2011 at 8:26 AM

instead of using edmx why can't we use code first approach.. its pretty good..

Sep 14, 2011 at 8:59 AM

actually I dont rely on edmx

the Model project dont have refenece to EF assemblies

you can think of it as code first

you can code classes that implement those interfaces and plug your implementation of IEntityBus that provides Model classes that you have coded

my usage of edmx is just because Im a little lazy I could just handwrite those generated interfaces. Because my edmx has Model definition csdl I asked it to generate interfaces for me but again those interfaces dont use EntityFramework you can createyour own implementation, they are decoupled


I have added some explanation look here :