WPF Prism Entity Framework repository - wpf

I am building a WPF application using the PRISM guidance, I want to use the Entity Framework 4 for a data repository.
I have previously developed a Silverlight app, using Prism and WCF RIA Services which worked great as all my components are decoupled.
So what is the best way of getting data in my WPF application in a decoupled way.
Thanks for any advise

You might have a look at the BookLibrary sample application of the WPF Application Framework (WAF). It shows how to use the Entity Framework in a WPF MVVM application. However, it's not PRISM.

Related

Generate CRUD UI automatically in WPF through Entity Framework

I am new to WPF. I want to know if there any feature exists in WPF using which, we can generate auto UI for CRUD operation using entity framework as we do in Asp.Net MVC?
No there is not such built-in feature in WPF. But you can use DataTemplates, ControlTemplates and User interface patterns such as MVVM and MVP to implement your own library to do that.

Sharing Silverlight and WPF Models with MVVM Light

I have a Silverlight class library which is a model in my MVVM app. I am using MVVM Light. How easy is it reuse that model in a WPF app and use the MVVM Light framework. The framework has different dlls for WPF and Silverlight so I guess there is incompatability of sorts. I was wondering if anyone could talk me through the options. Cheers, Chris.
The suggested option is to use the Project Linker, this tool synchronizes code over multiple projects, allowing you to maintain a Silverlight and WPF dll with one codebase.
I hope you mean model means data in WPF and Silverlight. If that is the case, you can expose the data using a Service. It can be any service like web service, WCF service or WCF RIA service. Since a service can be multi tenented you can have a Silverlight as well as WPF client accessing the same service.
If you are trying to share the ViewModels between Silverlight and WPF using MVVM light, I would suggest you have a look at the MIX 2011 video of the presentation by the creator of MVVMLight library Laurent Bugnion. This is called Deep Dive MVVM and is a very good session. In short you can share ViewModels between WPF and Silverlight by adding the file from one project to another as a "LINK".
Hope this helps

WPF VS Silverlight

I had a few questions on WPF & silverlight?
When to use WPF? Some examples on
real time projects where WPF is used
When to use silverlight? some examples of real time projects where silverlight is used
What is the difference between
them?
Can WPF and Silverlight be used together?
How do WPF and silverlight differ from traditional asp.net applications (form based & MVC)???
Does Silverlight use WCF to do it's code behind stuff..like it provides an interface and uses web service to get the code behind?
WPF vs Silverlight will tell you what you want to hear...
WPF is a thick Windows client platform that has access to the full .Net Framework. Silverlight is a browser-based technology that has access to a subset of the .Net Framework
In short I would generally use WPF for form/window applications and use Silverlight for online things. Though these both can be used for either, that is how/when I would use it.
WPF and Silverlight both use XAML, so if you can code in one, you can pick up the other just as easy.
WPF is a client based platform while Silverlight is web based. WPF has the full .NET framework available while Silverlight has a streamlined "smaller" version of the framework.
The nice part is both use the same markup (XAML). Both also can work with the MVVM pattern for easy conversion from client to web app and vice versa.
I would read up a little on the web as these arethe basics of these 2 technologies.
WPF and Silverlight are conceptualy completly different things. They use same technology, but their purpouse is completly different.
WPF is thick client framework, that is supposed to replace WinForms in (I hope) nearest future. It has acces to full .NET framework.
Silverlight is Flash-like technology for rich internet applications and thin clients. It is complementary to standard ASP.NET technology. If you want to increase amount of eye-candy or give user much richer interaction options for your web, this is way to go.
They both use same visual-description technology (XAML) and same principles (DataBinding, Templating, Separation of visuals and code, etc..). But their intended usage is different.

MVVM VS WPF Browser Application?

How to use MVVM in WPF Browser Application?
I want to know how to use MVVM in WPF Browser application,
Is that really worthful when comapre with Silverlight?
Which technology is having higher performance for mvvm Silverlight or WPF?
I am going to have my Business layer using ASMX 2.0 (or) WCF
Please help me on this,
Thanks in advance.
A good place to start is by looking at the PRISM framework. It will allow you to implement the MVVM pattern in a WPF browser application. I have been using this technique for sometime without any issue.

Can A winform app be switched to a WPF one if MVC architecture is used?

If we develop a winform app using an MVC architecture, it should not be too hard to change over to WPF at a later date, correct?
Well designed WPF application heavily leverage data-binding. As such, you might consider using classes such as ObservableCollection and others and implement IPropertyNotify when designing your model.
Look up some references to the M-V-VM pattern advocated by Microsoft product groups (e.g., Blend) for more information.
It seems that in Codeplex there is an MVC winform open souce fmwk for developping winforms app
That framework is koossery.MVCwin, located on Codeplex at http://koosserymvcwin.codeplex.com

Resources