Click here to Skip to main content
15,894,405 members
Articles / Web Development / ASP.NET

Developing a Loosely Coupled Silverlight 3 Application

Rate me:
Please Sign up or sign in to vote.
4.94/5 (20 votes)
20 Jul 2009CPOL12 min read 94.7K   1.3K   109  
Create a line of business application using Silverlight 3.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

using Ag3DemoDataModels;
using Ag3DemoServerComponents;

// NOTE: If you change the class name "Ag3DemoWCFService" here, you must also update the reference to "Ag3DemoWCFService" in Web.config.
public class Ag3DemoWCFService : IAg3DemoWCFService
{
    
    /// <summary>
    /// Create Registration
    /// </summary>
    /// <param name="membershipInformation"></param>
    /// <returns></returns>
    public MembershipDataModel CreateRegistration(MembershipDataModel membershipInformation)
    {
        Membership membership = new Membership();
        MembershipDataModel returnedMembershipInformation;

        returnedMembershipInformation = membership.CreateRegistration(membershipInformation);
        return returnedMembershipInformation;
    }

    /// <summary>
    /// Validate Login
    /// </summary>
    /// <param name="emailAddress"></param>
    /// <param name="password"></param>
    /// <returns></returns>
    public MembershipDataModel ValidateLogin(string emailAddress, string password)
    {
        Membership membership = new Membership();
        MembershipDataModel returnedMembershipInformation;

        returnedMembershipInformation = membership.ValidateLogin(emailAddress, password);
        returnedMembershipInformation.ListOfStates = membership.GetListOfStates();
        return returnedMembershipInformation;
    }

    /// <summary>
    /// Update Membership Information
    /// </summary>
    /// <param name="membershipInformation"></param>
    /// <returns></returns>
    public MembershipDataModel UpdateMembershipInformation(MembershipDataModel membershipInformation)
    {
        Membership membership = new Membership();
        MembershipDataModel returnedMembershipInformation;

        returnedMembershipInformation = membership.UpdateMembershipInformation(membershipInformation);
        return returnedMembershipInformation;

    }

    /// <summary>
    /// Get Membership Information
    /// </summary>
    /// <param name="membershipInformation"></param>
    /// <returns></returns>
    public MembershipDataModel GetMembershipInformation(string emailAddress)
    {
        Membership membership = new Membership();
        MembershipDataModel returnedMembershipInformation;

        returnedMembershipInformation = membership.GetMembershipInformation(emailAddress);
        returnedMembershipInformation.ListOfStates = membership.GetListOfStates();
        return returnedMembershipInformation;

    }

}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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


Written By
Software Developer Joey Software Solutions
United States United States
Mark Caplin has specialized in Information Technology solutions for the past 30 years. Specializing in full life-cycle development projects for both enterprise-wide systems and Internet/Intranet based solutions.

For the past fifteen years, Mark has specialized in the Microsoft .NET framework using C# as his tool of choice. For the past four years Mark has been implementing Single Page Applications using the Angular platform.

When not coding, Mark enjoys playing tennis, listening to U2 music, watching Miami Dolphins football and watching movies in Blu-Ray technology.

In between all this, his wife of over 25 years, feeds him well with some great home cooked meals.

You can contact Mark at mark.caplin@gmail.com

...

Comments and Discussions