zzz projects Entity Framework 6 EF 6
Home EF Core Articles Knowledge Base Online Examples
  • Home
  • EF Core
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework 6 - Knowledge Base (KB)

15 results in tag: json.net

Json.Net is used to serialize Entity Framework objects.

How do I serialize entity framework object into JavaScript Object (JSON)? I tried using ...JSON.NET... but I am getting the following exception when I try to serialize it. ...Exception: Newtonsoft.Json.JsonSerializationException, Message="Self referencing...
asp.net-mvc entity-framework javascript json.net
asked by Hitesh

When serializing my entities using Json.Net, I get unexpected characters ("").

I am using the excellent Json.Net library to serialize my entities generated by entity framework. I use the following code to do so :...using (MyVoucherEntities context = new MyVoucherEntities()) { List<MyObject> list = context.MyObjects.ToList(); str...
c# entity-framework json.net wcf
asked by Renaud

In Json.net, serialize one to many relationships.

I am using the Entity Framework code first for data access and I have a Company class which has a collection of Employees. The Employee class also has a Company property....I would like to be able to serialize a Company and include the list of employees i...
ef-code-first entity-framework json.net serialization
asked by Emad

serialize entity foundation object using json.net (circular reference error)

I have an entity framework entity that i want to serialize as a json object. I looked around and found out that json.net (http://james.newtonking.com/projects/json-net.aspx) should be able to serialize objects with circular references "out of the box". So...
asp.net c# entity-framework json.net
asked by Johan

Is it possible to instruct JSON.Net to serialize DateTime as UTC even if no time zone is specified?

Dates in my database are stored as Utc. But when I retreieve them w/ the entity framework they come out as type unspecified....When JSON.Net serializes them they are not in Utc format. Is there a way to tell JSON.Net to serialize DateTimes as Utc even if ...
asp.net entity-framework javascript json.net
asked by C.J.

Self referencing loop detected - Getting back data from WebApi to the browser

I am using Entity Framework and having a problem with getting parent and child data to the browser. Here are my classes:... public class Question { public int QuestionId { get; set; } public string Title { get; set; } public virtual ICollecti...
asp.net-web-api c# entity-framework json.net serialization
asked by user1943020

Always have error "The ObjectContent 1 type failed to serialize the response body..."

I use Web api to retrieve data from the database. I only have 1 table "tblMessage" and want to get data from that table....I set everything up but then when I run the website. the error always say...The 'ObjectContent`1' type failed to serialize the respo...
asp.net-web-api c# entity-framework json.net serialization
asked by kaboom

Build JSON Hierarchy from Structured Data

C# | .NET 4.5 | Entity Framework 5...I have data coming back from a SQL Query in the form of ID,ParentID,Name. I'd like to take that data and parse it into a Hierarchical JSON string. So far it seems to be much more of a daunting task than it should be. S...
c# entity-framework hierarchy json json.net
asked by Will

MVC Handling Timezones and JSON Serialization - How to Convert to Specific Timezone

I've spent quite a bit of time on stackoverflow and the internet trying to determine what has been done in my situation. I am building a centralized line of business website that could span multiple timezones. Based on some valuable information here I ...
.net-4.5 asp.net-mvc-5 entity-framework-6 json.net timezone
asked by nickgru

How Do You "Really" Serialize Circular Referencing Objects With Newtonsoft.Json?

I'm having a problem getting some data serialized correctly from my ASP.NET Web API controller using Newtonsoft.Json. ...Here's what I ...think... is going on - please correct me if I'm wrong. Under certain circumstances (specifically when there aren't ...
asp.net-web-api c# entity-framework json json.net
asked by jgoeglein

PUT action on WebApi Controller not saving data to database

I have a very simple MVC5 WebApi project with the following models:...public class Product { public Product() { } public int ProductId { get; set; } public string ProductCode { get; set; } public int BomId { get; set; } publi...
asp.net-web-api entity-framework-6 json json.net
asked by paulpitchford

WEB API JSON Serializing Circular References

I'm trying to access the property fields (JSON) from the child entity that is received from Web API. By looking at the browser console, however, it is showing a reference instead of the fields. How do I get access to these fields?...ANGULAR JS VIEW... <ta...
asp.net-web-api2 entity-framework-6 json.net
asked by Erkan Demir

Is this a bug in JSON.NET or Entity Framework or am I doing something wrong while trying to serialize a list of Exceptions with JSON.NET?

Got this error when trying to serialize a set of errors:..."ISerializable type 'System.Data.Entity.Infrastructure.DbUpdateConcurrencyException' does not have a valid constructor. To correctly implement ISerializable a constructor that takes SerializationI...
entity-framework-6 exception json.net serialization
asked by Triynko

JsonFormatter ReferenceLoopHandling

I have been struggling with this for a few days now, not finding any joy in any solutions I have found so far....The project is built using Entity Framework 6 and WebAPI 2. I have changed the my WebApiConfig settings to ... config.Formatters.Remove...
asp.net-web-api2 c# entity-framework-6 json.net
asked by Dimitris Savva

Web API JSON deserialization converting value issue

I am trying to insert JSON data into my models via EF 6. I am getting this error;... Inner Exception is {0}System.ArgumentException: Could not cast or convert from System.String to EPINMiddleWareAPI.Models.Serial. konum: Newtonsoft.Json.Utilities.Co...
asp.net-web-api entity-framework-6 json.net
asked by Cenk

Page 1 of 1
  • 1

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Save your entities 20× faster with EF Extensions
SaveChanges vs BulkSaveChanges

EF Extensions
Try for free now
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!