Explain Service contracts?
Submitted by: AdministratorDescribe which operations the client can perform on the service.
There are two types of Service Contracts.
ServiceContract - This attribute is used to define the Interface.
OperationContract - This attribute is used to define the method inside Interface.
[ServiceContract]
interface IMyContract
{
[OperationContract]
string MyMethod( );
}
class MyService : IMyContract
{
public string MyMethod( )
{
return "Hello World";
}
}
Submitted by: Administrator
There are two types of Service Contracts.
ServiceContract - This attribute is used to define the Interface.
OperationContract - This attribute is used to define the method inside Interface.
[ServiceContract]
interface IMyContract
{
[OperationContract]
string MyMethod( );
}
class MyService : IMyContract
{
public string MyMethod( )
{
return "Hello World";
}
}
Submitted by: Administrator
Read Online WCF Data Services Job Interview Questions And Answers
Top WCF Data Services Questions
☺ | Tell me what is Proxy and how to generate proxy for WCF Services? |
☺ | Explain what is the difference WCF and Web services? |
☺ | Explain what are the main components of WCF? |
☺ | Explain WCF IPC binding type? |
☺ | Explain what is Transport and Message Reliability? |
Top Dot Net Technologies Categories
☺ | MSF Interview Questions. |
☺ | .Net Architecture Interview Questions. |
☺ | ASP.Net MVC Interview Questions. |
☺ | Entity Framework Interview Questions. |
☺ | C# (Sharp) Programming Language Interview Questions. |