I am trying to store a Json serialized EF object in another database.
One of the items I'm strying to store is the cart, which has some relateded tables.
How can I store the cart, without dragging its relations along (preferably without resorting to .Select() to handpick the distinct columns)
[AllowAnonymous]
public ActionResult Test() {
using (var db = new DALEntities())
{
var q = db.tblCarts.SingleOrDefault(x => x.CartItemID == 4275);
q.tblContactsExtra = null;
q.TBLINVENTORY = null;
var settings = new JsonSerializerSettings {PreserveReferencesHandling = PreserveReferencesHandling .Objects} ;
var str = JsonConvert.SerializeObject(q, settings);
return Content(str);
}