I got a problem on using WCF service and Entity Model with together. I have created an Entity Model from my existing database. This can be shown below;
There isn't any problem while using my classes in any console applicaton coming from "Entity Object Code Generator".
Then, I created WCF Service with Interface Below:
[ServiceContract]
public interface IAuthorServices
{
[OperationContract]
[WebGet( UriTemplate="GetNews")]
List<Newspaper> GetNews();
[OperationContract]
[WebGet(BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "GetAuthors")]
List<Author> GetAuthors();
[OperationContract]
[WebGet(BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "GetAuthorTexts")]
List<AuthorText> GetAuthorTexts();
[OperationContract]
[WebGet(BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "GetTodaysTexts")]
List<AuthorText> GetTodaysTexts();
[OperationContract]
[WebGet(BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "GetExceptions")]
List<KoseYazilari.Exception> GetExceptions();
}
However when I implement these methods in a service class and run my client application, I got an error like
How can I get rid of this problem?
Regards, KEMAL