Click here to Skip to main content
15,898,010 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I am new to WPF and Entity Framework. I am planning to use MVVM pattern in a WPF client application and Entity Framework for model. For security reasons, I am keeping the model(Entity Framework) in a separate project i.e my client application will have only view and viewmodel. In this case which is the best way to communicate between model and viewmodel?

Thanks in advance...
Posted

1 solution

A separate project simply makes a separate assembly which should be referenced by other assemblies. It makes almost no differences compared to the monolithic solution. You only need to take into account access modifiers: if some type and it's member are to be accessed by a different assemblies, it should have public access modifier, or protected, for members of some base classes. Types and members to be accessed inside assembly only should be internal.

I hope you know how to reference assemblies. I would highly recommend to keep all referenced assemblies in one solution and use referencing by projects, using the "Project" tab in the "Add Reference" window (not "Browse" tab).

I all other respects, you use the declarations of another assembly in exact same way as in a monolithic solution,

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900