Step to Create the Application
1) Create a Silver Light Application (web).
2) Add WCF service template or Silver Light-enabled WCF service template to Silver Light Application Testing project.
3) Add OperationContract called GetCustomers in Service.cs.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
namespace DBPagenation.Web
{
// NOTE: If you change the interface name "ISreeniDataService" here, you must also update the reference to "ISreeniDataService" in Web.config.
[ServiceContract]
public interface ISreeniDataService
{
[OperationContract]
ListGetCustomers(int pageNumber);
}
}
4) Add LINQ to SQL Classes and create a data class by dragging Customers table from server Explorer. And change the serialization mode properties to Unidirectional. This properties make data class as realizable [DataContract].
Silver Light UI CODE:
using Slider control now navigate different pages of customer records instead of clicking old style like 1 2 3 4 5...
Thanks
SeenivasaRagavan
No comments:
Post a Comment