Can you mix EDMX and code first with existing database?

Rod Falanga 566 Reputation points
2020-09-26T02:02:24.297+00:00

Where I work, they have used Entity Framework's EDMX files for longer than I've been there. Every new project brings will include the older EDMX files. I prefer to use EF's code first with existing database DbContext/DbSet etc.

I'd like to know; can I add EF's code first with existing database to an app that uses EDMX files? Or will the two of them interfere with each other?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,995 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Olaf Helper 45,101 Reputation points
    2020-09-26T05:48:18.173+00:00

    EDMX = Entity Data Model XML?

    I don't see anything really related to SQL Server, better post your question to .NET/EF forum.

    0 comments No comments

  2. Rod Falanga 566 Reputation points
    2020-09-26T13:06:34.697+00:00

    @Olaf Helper you are correct, but there is no Entity Frameframe tag I could use. SQL Server was the closest I could think of, thus why I used it.

    0 comments No comments

  3. AmeliaGu-MSFT 13,986 Reputation points Microsoft Vendor
    2020-09-28T02:17:47.867+00:00

    Hi @Rod Falanga ,

    It seems your issue is more related to Entity Framework.
    .NET is currently not supported in the Q&A forums.
    I suggest you open a thread in the dedicated .NET forum so that people there will help you more effectively.
    Best Regards,
    Amelia


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.