In this article, we will see how to develop a simple Silverlight application with MVVM, WCF services and Entity Framework.In my earlier article, I have described how to develop simple Silverlight applications using the MVVM pattern. (Link to article)In this article, we will include how to create a Silverlight application with WCF services also.Steps
Add a new Silverlight project
Creating Model Project
Add WCF service project
[OperationContract]List<SchoolClass> GetSchoolClasses();
public List<string> GetClasses()
{
SanthoshEntities entity = new SanthoshEntities();
List<SchoolClass> list = entity.SchoolClasses.ToList();
return list.Select(m => m.Name).ToList();
}
public List<SchoolClass> GetSchoolClasses()
return entity.SchoolClasses.ToList();
Add Service reference to Silverlight
Setting up the Silverlight project
SO in this article, we have seen how to create a simple Silverlight application in the MVVM pattern with WCF and the Entity Framework.For a complete set of source code, please find the attached file.Please give your valuable comments to improve the article and don't forget to rate the article if you find it useful.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: