sly_Chandan
sly_Chandan

Reputation: 3515

DataContract not working and classes are not showing on the client

[ServiceContract(SessionMode = SessionMode.Required)]
    public interface IActionService
    {
        [OperationContract]
        MovieResponse GetReviews(MovieRequest request);

        [OperationContract]
        UserResponse GetUsers(UserRequest request);

        [OperationContract]
        UserResponse InsertUser(UserRequest request);
    }

    [DataContract]
    public class UserRequest
    {
        [DataMember]
        public int userId;

        [DataMember]
        public User user;
    }

I cant see the userrequest and userresponse in my ServiceReference at the client. Why?

Upvotes: 0

Views: 1065

Answers (1)

sly_Chandan
sly_Chandan

Reputation: 3515

I had a reference to the WCF Service application assembly which should not be there. After removing the reference I could see my Classes. Thanks

Upvotes: 1

Related Questions