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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:31:21+00:00 2026-05-29T09:31:21+00:00

i am developing a database with 3 tables Trip Model: [Key] public int TripId

  • 0

i am developing a database with 3 tables

Trip Model:

    [Key]
    public int TripId { get; set; }

    [ForeignKey("Driver")]
    public int DriverId { get; set; }
    public virtual Driver Driver { get; set; }

    public string StartingPoint { get; set; }

    public string Destination { get; set; }

    public DateTime TimeDepart { get; set; }

    public int SeatAvailable { get; set; }

    public virtual ICollection<Driver> Drivers { get; set; }

    public virtual ICollection<Passenger> Passengers { get; set; }

Driver model:

    [Key]
    public int DriverId { get; set; }

    public string DriverName { get; set; }

    [ForeignKey("Trip"), Column(Order = 0)]
    public int TripId { get; set; }
    public virtual Trip Trip { get; set; }

And last passenger model:

    [Key]
    public int PassengerId { get; set; }

    public string PassengerName { get; set; }

    [ForeignKey("Trip"), Column(Order = 1)]
    public int TripId { get; set; }
    public virtual Trip Trip { get; set; }

With:

    public class LiveGreenContext: DbContext
    {
        public DbSet<Trip> Trips { get; set; }
        public DbSet<Driver> Drivers { get; set; }
        public DbSet<Passenger> Passengers { get; set; }
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
    {
        modelBuilder.Conventions.Remove<IncludeMetadataConvention>();
    }

And i get the following error:

Model compatibility cannot be checked because the EdmMetadata type was
not included in the model. Ensure that IncludeMetadataConvention has
been added to the DbModelBuilder conventions.

Any solutions on this issue? Thanks!

  • 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-05-29T09:31:22+00:00Added an answer on May 29, 2026 at 9:31 am

    Try adding a call to the Database.SetInitializer method in the Application_Start event handler of your Global.asax:

    Database.SetInitializer<ContextName>(null);
    

    where ContextName is the name of your custom DbContext class.

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

Sidebar

Related Questions

I'm developing against a DB2 database, and at some point I get an error
I have a SQLite database, and several tables within that datbase. I am developing
We are developing an application with around 400 database tables. and have equal number
I am developing a cakephp application, I dont need to use any database tables
I'm developing a project that works on remote server database tables. But there were
I'm developing a POS system and I need to check whether the database tables
I’m working with Access 2010. I’m developing a database for a public art program
In an application we are developing, I have access to a database table which
I am developing a database file system .It includes a multi-directory watcher which is
I am developing a Database File System . I am using - .Net framework

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.