WCF Multiple Services
- by David
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!?