0
I created a Class Library project and in it a POCO class. I created an Interface (all following John Sharp’s book). Then I created my WS with WCF. Well, in the interface I declared a method of my class type created in Class Library and the interface did not recognize. I added the DLL to the project reference and I still can’t include it in the project. What should I do?
I am trying in several ways and without success. I have removed and added the DLL, restarted the machine and yet, nothing. Class is mapped with Datacontract. The code is like this:
using System.Data.Linq.Mapping;
using System.ServiceModel;
using System.Runtime.Serialization;
namespace SuporteTecnicoContracts
{ 
    [Table(Name="T_PDV")]
    [DataContract]
    public class TPDV
    {
        [Column]
        [DataMember]
        public int IDPdv { get; set; }
        [Column]
        [DataMember]
        public string CNPJ { get; set; }
        [Column]
        [DataMember]
        public string RazaoSocial { get; set; }
.......
My Interface
using System.ServiceModel.Web;
using SuporteTecnicoContracts;
namespace SuporteTecnico.Interface
{
    [ServiceContract]
    public interface ISuporteTecnicoContract
    {
        [OperationContract]
        [WebGet(UriTemplate = "/")]
        TPDV getCnpjParceiro(string _cnpj); ==> Não reconhece TPDV
    }
}
Just clearing up:
TPDVis in a DLL andISuporteTecnicoContractis in WS. WS references the DLL. Right?– Leonel Sanches da Silva
It looks like this: A class library (Support) project that has TPDV. An interface that is in my main project, not in the library class that has the library class DLL. And an svc
– pnet