User-758219241 posted
My database is having following table
Country >> CountryId, Country
Following is the exact architecture in my application.
Geography_EF >> Entity framework project (using EF 5) Geography_Model >> Model generated from EF (in short, entity classes). This contains Country class. Geography_WCF >> WCF application containing various service contracts.
The issue is that when I write an operation contract returning Country object (or collection) it gives me an error saying "The underlying connection is closed. "The underlying connection was closed: The connection was closed unexpectedly." Here, I can see
the call gets completed to this operation contract and immediately this exception occurs.
whereas if I write an operation to return a specific field only (i.e. CountryId or Country table) then it works fine.
I am using repository pattern and Unity container as well.
What do you think, I am missing?