WCF Multiple Services
Posted
by David
on Stack Overflow
See other posts from Stack Overflow
or by David
Published on 2010-04-22T13:02:41Z
Indexed on
2010/04/22
13:03 UTC
Read the original article
Hit count: 303
wcf
Hi, im brand spanking new to WCF and Im trying to understand how to correctly expose my BLL to it. I created my first Resource.svc and IResource.svc
Resource.svc
[ServiceBehavior]
public class Resources : IResources
{
#region IResources Members
public List<Model.Resource> GetAll()
{
return Repository.Inventory.Resource.GetAll(true);
}
public List<Model.Resource> GetAllEnabled()
{
return Repository.Inventory.Resource.GetAllEnabled(true);
}
#endregion
}
IResource.cs
[ServiceContract]
public interface IResources
{
[OperationContract]
List<Model.Resource> GetAll();
[OperationContract]
List<Model.Resource> GetAllEnabled();
}
So this all works, My windows app can talk to the service and all is great. So I now need to access some information, I have created another .svc file called Project.svc and IProject.cs, this contains the same info as resource (apart from the type is Project) But this now means I have another webservice, surley this is not right!?
© Stack Overflow or respective owner