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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:46:16+00:00 2026-06-17T09:46:16+00:00

I built the entity model from the database, using Entity Framework Version 5.0. The

  • 0

I built the entity model from the database, using Entity Framework Version 5.0. The following DDL was used to create the tables:

CREATE TABLE [dbo].[Replenishment](
    [replenishmentId] [int] IDENTITY(1,1) NOT NULL,
    [locationID] [int] NOT NULL,
    [inventoryItemId] [int] NOT NULL,
PRIMARY KEY CLUSTERED 
    ([replenishmentId] ASC)
    WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
    ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]

GO

ALTER TABLE [dbo].[Replenishment]  
    WITH CHECK ADD  CONSTRAINT [FKReplenishm163678]
    FOREIGN KEY([inventoryItemId])
    REFERENCES [dbo].[InventoryItem] ([inventoryItemId])
GO

ALTER TABLE [dbo].[Replenishment] CHECK CONSTRAINT [FKReplenishm163678]
GO

ALTER TABLE [dbo].[Replenishment]  
    WITH CHECK ADD  CONSTRAINT [FKReplenishm580804] 
    FOREIGN KEY([locationID])
    REFERENCES [dbo].[Location] ([locationID])
GO

ALTER TABLE [dbo].[Replenishment] CHECK CONSTRAINT [FKReplenishm580804]
GO

When I build an entity model with the tables Replenishment, Location, and InventoryItem, all three tables show up in the model, but none of the relationships do.

Does anyone know why the foreign keys or the navigation properties don’t appear?

============================================================================

Here is the DDL from the associated tables:
Here is the ddl from the other two tables:

CREATE TABLE [dbo].[Location](
[locationID] [int] IDENTITY(1,1) NOT NULL,
[addressID] [int] NULL,
[availabilityStatusID] [int] NOT NULL,
[inLocationId] [int] NULL,
[locationTypeID] [int] NOT NULL,
[locationName] [varchar](40) NOT NULL,
[locationDescription] [varchar](100) NOT NULL,
[locationAnchorX] [int] NULL,
[locationAnchorY] [int] NULL,
[locationImage] [varchar](255) NULL,
[diagramLayerId] [int] NULL,
[locationShapeParameters] [varchar](max) NULL,
[locationHeight] [int] NULL,
    [locationWidth] [int] NULL,
    [locationColor] [varchar](20) NULL,
PRIMARY KEY CLUSTERED 
(
[locationID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY     = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[Location]  WITH CHECK ADD  CONSTRAINT [FKLocation209934] FOREIGN KEY([inLocationId])
REFERENCES [dbo].[Location] ([locationID])
GO

ALTER TABLE [dbo].[Location] CHECK CONSTRAINT [FKLocation209934]
GO


CREATE TABLE [dbo].[InventoryItem](
[inventoryItemId] [int] IDENTITY(1,1) NOT NULL,
[itemTaxonomyId] [int] NOT NULL,
[itemDescription] [varchar](100) NOT NULL,
[itemCode] [varchar](40) NULL,
[batchControlled] [bit] NOT NULL,
[assemblyDefinitionID] [int] NULL,
PRIMARY KEY CLUSTERED 
(
    [inventoryItemId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO
  • 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-17T09:46:18+00:00Added an answer on June 17, 2026 at 9:46 am

    I believe that I found the problem. I had been doing some work with SQL Server authentication and some work with windows Authentication. The information entered using Windows Authentication was not seen by my Visual Studio, which was connecting using SQL Server authentication.

    After further research I found that this was not the case. I am still bemused by this.

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

Sidebar

Related Questions

I've built an Entity Framework Model from a simple SQLite database using the 'Entity
I've built an MVC3 application using the Entity Framework database first approach. I was
I have built up a code-first model using Entity Framework 5. The classes have
In my application I'm using Entity Framework 4.0 Model First. I have several tables
I currently have an Entity Framework model that collects data from a legacy database
Now that I have built a database. Visual Studio 2008 SP1’s ADO.NET Entity Framework
I am using EF 4 (database first, model fully generated from it) with an
I'm updating my model which is built by entity framework. I removed a entity
I've got an Entity Framework 4 model. There's 2 tables in that model, Subscribers
My context model has a couple of related tables: CREATE TABLE CarSystem.Reads ( ReadId

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.