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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:09:09+00:00 2026-06-14T03:09:09+00:00

Using EF Db first, I have two tables: Table1: AppId, AppName, AppGuid [PK] Table2:

  • 0

Using EF Db first, I have two tables:

Table1: AppId, AppName, AppGuid [PK]

Table2: AppGuid [FK], Description, Url

Can EF create a one entity from the both?

Meaning:

App:
AppId, AppName, AppGuid, Description, Url

Update

Thanks. I have made a view. Mapped it to EF. Now I get the following error: Error 2 Error 111: Properties referred by the Principal Role App must be exactly identical to the key of the EntityType MaMDBModel.App referred to by the Principal Role in the relationship constraint for Relationship MaMDBModel.FK_AppsData_App. Make sure all the key properties are specified in the Principal Role. D:\MaM\Dev\MamAdmin_1.0\MaMDBEntityFramework\MaMModel.edmx 768 11 MaMDBEntityFramework

this is my edmx:

http://ge.tt/3rRWTOR/v/0?c

  • 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-14T03:09:11+00:00Added an answer on June 14, 2026 at 3:09 am

    You can create a VIEW using a JOIN between these 2 tables. After this you can use that View from EF.

    Do this in SQL

    CREATE VIEW [ViewName] AS
    SELECT *
    FROM Table1 JOIN Table2 ON Table1.AppGuid = Table2.AppGuid
    

    And import ViewName in your Entity Framework model (as you would do with a normal SQL Table) and use it to query whatever you need

    EDIT: Have a look at this link for more info http://www.mssqltips.com/sqlservertip/1990/how-to-use-sql-server-views-with-the-entity-framework/

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

Sidebar

Related Questions

I have the same trigger on two tables. The first one: CREATE TRIGGER updateURL1
So I have two tables, Table1 and Table2. Table one has an integer that
I have two forms. First one is to decide button numbers by using jslider.
I have two tables Table1 and Table2. There are 10 fields in Table1 and
I have two tables with this structure: Table one: ID Description Table two: ID
I have two tables: table1 (id, name, connte) table2 (id, name, connte) They are
I'm using jQuery validation plugin. I have two images: first background of label, when
Hey everyone, I want to start using Scheme and I have two questions. First,
I'm using Entity Framework Code First v 4.3.0 I have a two entities with
Using Dozer to map two objects, I have: /** /* This first class uses

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.