use interfaces in Model

Coordinator
Sep 9, 2011 at 12: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

Coordinator
Sep 10, 2011 at 11:05 AM

Done in changeSet 8176

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

Developer
Sep 14, 2011 at 7:26 AM

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

Coordinator
Sep 14, 2011 at 7: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 : http://moneymanagernet.codeplex.com/documentation