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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:22:31+00:00 2026-06-11T08:22:31+00:00

I have just started to investigate Microsoft’s Entity Framework (EF) with a view to

  • 0

I have just started to investigate Microsoft’s Entity Framework (EF) with a view to replacing our existing Linq2Sql data access library.

Whilst following some of the sample projects I came across the ‘Add Code Generation Item’ (context menu on the designer surface), specifically the ‘EF 5.x DbContext Generator’ template.

This template generates some nice simple (POCO) class objects for the model.

In my overall structure, I would like to extract/move these classes into a different project/assembly so that I can reference them from a generic repository i.e. I want to decouple the application’s Data Access Layer from the EF entity data model.

Is this possible, or do I need to manually create a map for each class object (e.g. .ToDomainModel(), .FromDomainModel()).

Apologies if this is a stupid question – in my defence I am new to EF and also still getting to grips with the concept of the Data Driven Domain.

  • 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-11T08:22:33+00:00Added an answer on June 11, 2026 at 8:22 am

    It is possible but you will lose part of the auto-magic. The auto-generated item is a T4 template. If you open it you will find somewhere at the beginning relative path to .edmx file. If you move the template you just need to update the path accordingly to point to the .edmx file you want to use for generation.

    The disadvantage is that moving the template elsewhere will break automatic class regeneration when the .edmx file is saved (but I didn’t searched for the solution so maybe it is possible to make it work). Because of that you must manually run custom tool (item in .tt file context menu) after each saved change to EDMX file.

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

Sidebar

Related Questions

we have just started using a git account of our Django website project so
I have just started migrating my homegrown persistence framework to JPA. Given that the
I have only just started to investigate... but thought I would throw this to
Have just started using Google Chrome , and noticed in parts of our site,
I have just started with the .NET framework. Today, I was taught about the
I have just started with .NET Framework with C# as my language. I somewhat
I have just started using Ember.js framework and I have simple problem. I have
Have just started converting an existing job tracking system into an ASP.NET MVC application.
I have just started to do some coding with Access and trying to create
I have just started using RSpec and I copied the very simple test on

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.