Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9090473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:22:45+00:00 2026-06-16T22:22:45+00:00

I have build a very very simple database schema as **Tickets**: TicketId (PK) AreaId

  • 0

I have build a very very simple database schema as

**Tickets**:
TicketId (PK)
AreaId (FK)
SeverityId (FK)
AssigneeId (FK)

**Areas**:
AreaId(PK)
AreaName

**Severities**:
SeverityId(PK)
SeverityName

**Assignees**:
AssigneeId(PK)
AssigneeName

I create the Entity Model and in the TicketController I am trying to retrieve and Json the data inside the Tickets table.

[HttpPost]
public ActionResult Index([DataSourceRequest]DataSourceRequest result)
{
var tickets = db.Tickets.Include(t=> t.Areas).Include(t=> t.Assignees).Include(t=> t.Severities)

DataSourceResult result = tickets.ToDataSourceResult(request);

Return Json(result);
}

For a reason that I cannot understand when I Json the result in order to pass it to a KendoUiGrid in the view, I get the “circular reference error”. I see no circular reference in my tables/entities relations!!

In the Kendo documentation I read this

If you decide to use the Kendo UI JavaScript libraries directly,
returning JSON is simple. You just need to defined a controller
method and call this.Json on your return result. Provided .NET can
serialize your response, this is all there is to it.

Does all the above mean that in reality I cannot Json entities that come from sane database schemas with primary/foreign keys?

Thanx in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T22:22:46+00:00Added an answer on June 16, 2026 at 10:22 pm

    Create a flat Model class and pass the model to Json and Grid. You will have to populate the model a little more manually than what you are trying to do here, but there are other benefits to having a model that you will discover later. The circular reference is because of the navigational properties of your EF classes. In MVC the model does not mean the data model classes, but new ones you create. Done right the new model should do most of the work, validation, translation, etc. The controllers just passes things around, the view just renders. Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple question. In FB tutorial https://developers.facebook.com/docs/mobile/ios/build/ it starts to login
I'm trying to build a very simple location-based app and I have all of
I have a SQL Express database, and I'd like a very simple forms application
I have built a very simple blog application using Ruby on Rails. New to
I'm working with a website built in .net, I have a very simple popup
I have build my very first application to Android and I want now to
I am very new to OSM. I have to build an Java App for
I am using cakePHP 1.26. I am going to build a very simple forum
I want to build a very simple servlet that will read the http posted
My task is to build a simple database to hold information on IT infrastructure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.