How to generalise the endpoints in my channelfactory
- by Meher
Hi,
I have a requirement to actually generalise the endpoints of different WCF services,create a proxy and invoke the action.
We have like 4 pages and 4 services to serve those pages. For each n every page we have to call the specific service endpoint and invoke the action
Example::
private IList<FunctionCodes> i_oFunctionList;
ChannelFactory<IFunctionService> m_oFunctionFactory;
IFunctionService m_oFunctionProxy;
m_oFunctionFactory = new ChannelFactory("FunctionServiceEndPoint");
i_oFunctionList= m_oFunctionProxy.GetAllFunction(iFirstResult, iMaxPageSize, "", "", "", out iRows);
BindGrid bindGrid = new BindGrid(DisplayGrid1);
bindGrid.DataTable = BuildDataTable(i_oFunctionList);
So the requirement is we want to move this section(binding the grid) to a user control, generalising the endpoints, create the proxy and implement. Is there any way to achieve this? Quick responses are really appreciated.