This is an interface:
[ServiceContract]
public interface ISectionFacts
{
[OperationContract]
DataSet GetSectionFacts(int SectionFactID);
}
This is DAL
public class SectionFactsDAL : ISectionFacts
{
public DataSet GetSectionFacts(int SectionFactID)
{
write down the code here to call the sp and return dataset;
}
}
Thisis the service class
public partial class SectionsService : ISectionFact
{
// Call the DAL function from here
public DataSet GetSectionFacts(int SectionFactID)
{
try
{
SectionFactsDAL objDAL = new SectionFactsDAL();
return objDAL.GetSectionFacts(SectionFactID);
}
catch
{
throw;
}
}
}
This is the service which reference will be added in the project
public partial class SectionsService : ISectionsService
{
#region ISectionsService Members
#endregion
}
Now bulid this and run the service and add the service reference in the application by Add Service Reference and run the application. this is the SOA Architecture.
[ServiceContract]
public interface ISectionFacts
{
[OperationContract]
DataSet GetSectionFacts(int SectionFactID);
}
This is DAL
public class SectionFactsDAL : ISectionFacts
{
public DataSet GetSectionFacts(int SectionFactID)
{
write down the code here to call the sp and return dataset;
}
}
Thisis the service class
public partial class SectionsService : ISectionFact
{
// Call the DAL function from here
public DataSet GetSectionFacts(int SectionFactID)
{
try
{
SectionFactsDAL objDAL = new SectionFactsDAL();
return objDAL.GetSectionFacts(SectionFactID);
}
catch
{
throw;
}
}
}
This is the service which reference will be added in the project
public partial class SectionsService : ISectionsService
{
#region ISectionsService Members
#endregion
}
Now bulid this and run the service and add the service reference in the application by Add Service Reference and run the application. this is the SOA Architecture.
3:05 AM |
Category:
SOA Architure
|
1 comments
Comments (1)
This is the SOA Architecture widly used in .Net. Here is the brief explantion about it.