Note that there are some explanatory texts on larger screens.

plurals
  1. POReturn Entity Framework objects over WCF
    primarykey
    data
    text
    <p>We have a problem concerning Entity Framework objects and sending them through WCF. We have a database, and Entity Framework created classes from that database, a 'Wallet' class in this particular situation.</p> <p>We try to transfer a Wallet using this code:</p> <pre><code>public Wallet getWallet() { Wallet w = new Wallet(); w.name = "myname"; w.walletID = 123; return w; } </code></pre> <p>We need to transfer that Wallet class, but it won't work, we always encounter the same exception:</p> <p>"An error occurred while receiving the HTTP response to localhost:8860/ComplementaryCoins.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details."</p> <p>We searched on the internet, and there is a possibility that the error is due to the need of serialization of Entity Framework-objects.</p> <p>We have absolutely no idea if this could be the case, and if this is the case, how to solve it. Our DataContract looks like this (very simple):</p> <pre><code>[DataContract] public partial class Wallet { [DataMember] public int getwalletID { get { return walletID; } } [DataMember] public string getname { get { return name; } } } </code></pre> <p>Does anyone ever encountered this problem?</p> <p>EDIT: Our Entity Framework created class looks like this:</p> <pre><code>namespace ComplementaryCoins { using System; using System.Collections.Generic; public partial class Wallet { public Wallet() { this.Transaction = new HashSet&lt;Transaction&gt;(); this.Transaction1 = new HashSet&lt;Transaction&gt;(); this.User_Wallet = new HashSet&lt;User_Wallet&gt;(); this.Wallet_Item = new HashSet&lt;Wallet_Item&gt;(); } public int walletID { get; set; } public string name { get; set; } public virtual ICollection&lt;Transaction&gt; Transaction { get; set; } public virtual ICollection&lt;Transaction&gt; Transaction1 { get; set; } public virtual ICollection&lt;User_Wallet&gt; User_Wallet { get; set; } public virtual ICollection&lt;Wallet_Item&gt; Wallet_Item { get; set; } } } </code></pre> <p>Thanks for helping us.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload