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 8879753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:01:19+00:00 2026-06-14T20:01:19+00:00

Inside of my model I have an attribute called attributes that its value is

  • 0

Inside of my model I have an attribute called attributes that its value is taken from the cutomized_attributes in my Database the property attributes does Not exist in the Database its just calculated value, while I’m trying to do the following I’m facing this error:

Error: System.Data.Entity.Edm.EdmEntityType: : EntityType ‘JToken’ has no key defined. Define the key for this EntityType

Model:

public class Restaurant
{
    public int id{ get; set; }
    public string  name{ get; set; }
    public string cutomized_attributes { get; set; }
    private JObject _attributes { get; set; }
    public JObject attributes
    {
        get
        {
            if (this._attributes == null)
                return this._attributes = RestaurantAttributes.parseAttrString(this.cutomized_attributes);
            return this._attributes;
        }
        set
        {
            this._attributes = value;
        }
    }

}
  • 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-14T20:01:20+00:00Added an answer on June 14, 2026 at 8:01 pm

    assuming you are using code first… within the dbcontext subclass

    protected override void OnModelCreating(DbModelBuilder modelBuilder)
    {
         modelBuilder.Entity<Restaurant>().Ignore(x => x.attributes);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with calling a property() inside a dynamic model in Django.
I've been trying to use a List<> of a Model.Person that I have inside
I have my Product model that has the attribute private . I want to
I have an m2m field called "admins" inside a model and I need to
Inside my page I have an input (Model) with a datalist attribute and a
I have installed rapache and I am trying to fit a linear model inside
I have a modal popup with several links inside that have the :confirm and
I have a model named UserPrice which has the attribute :purchase_date (a date_select) in
Hi I have a model called Listing. Here is the constructor for the model:
I'd like to use a couple of attributes from within a model as textField

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.