In WCF service, If you have lots of methods in your single service then you can physically split those methods ,and arrange them as per your requirements.
Interface:
ICalculator.cs[ServiceContract] public interface ICalculator { [OperationContract] double Add(double n1, double n2); [OperationContract] double Subtract(double n1, double n2); [OperationContract] double Multiply(double n1, double n2); [OperationContract] double Divide(double n1, double n2); }
Service Class:
1. CalculatorService.cs
public partial class CalculatorService : ICalculator {double Add(double n1, double n2){}double Subtract(double n1, double n2){}}2. CalculatorService2.cspublic partial class CalculatorService : ICalculator {double Multiply(double n1, double n2){}double Divide(double n1, double n2){}}
No comments:
Post a Comment