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

  • Home
  • SEARCH
  • 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 4096370
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:02:15+00:00 2026-05-20T20:02:15+00:00

I have model created with visual designer. Now I want to have POCO classes

  • 0

I have model created with visual designer. Now I want to have POCO classes generated from it. In another question of mine, EF4.1 simplified API Model First approach was suggested to me. Before I was also thinking about T4 templates.

What are the limitation of EF4.1 simplified API Model First comparing to using T4 templates to generate POCO classes ? What are advantages to of EF4.1 approach if any (besides it is supposed to be simpler to use)? My decision now will be very hard to undone as I will have quite huge persistence layer, so it might be hard to make changes to it in future.

Particularly, I’m interested in this features:

  • can I get either of those 2 options to generate database tables every time I change model (in visual designer) so I don’t have to generate queries and run them ? That would speed up my development process a lot (for some reason I have to drop tables manually every time I change model so it takes a lot of time). I know this can be done with
  • can I have POCO classes in another project ? I know this can be dome with T4 templates but is it also possible with simplified API?
  • can properties in generated POCO classes be annotated without being overwritten every time they gets regenerated from model ? (this is indeed possible with code-first approach)
  • is there any difference in efficiency?

If it matters any technology chosen will be used in ASP.NET MVC application.


EDIT:
Please answer any subquestion of my question if you know the answer. Maybe together with another partial answer it will give me the information I need. Thank you

  • 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-20T20:02:16+00:00Added an answer on May 20, 2026 at 8:02 pm

    EF 4.1 provides simplified API mostly glorified because of the code first approach available in EF for the first time. What you describe is the model first approach.

    I already answered similar question but I will try to answer your individual questions:

    • Main limitation of DbContext API is lack of information. We know new features but we still don’t know how to achieve some features available in ObjectContext API (simplification probably removed some features). I’m not sure how this relate to the model first approch with DbContext generator T4 template because in this case mapping is still defined in EDMX file so some well known problems with the code first mapping should be overcome.
    • Generating database works automtic with DbContext API. ObjectContext API by default offers only db script generation and you must execute the script. On the other hand if you have VS 2010 Premium or Ultimate you can download Entity designer database generation power pack which will allow you building your database incrementaly without deleting it every time. That is something not possible with DbContext API at the moment.
    • You can have POCO classes (templates) in other project with both APIs.
    • Yes even with T4 template generating POCO classes you can use annotations.
    • No there is no difference in efficiency. DbContext API is just wrapper on top of ObjectContext API.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a model Question with a field called userid , before one ask
I am using Visual Studio 2008 | .NET 3.5 | C#. I have created
i have very simple problem. I need to create model, that represent element of
I have a model being populated by my data layer and then I have
I have some model objects I'm using in my Java client application. Later these
I have a model, Thing, that has a has_many with ThingPhoto, using Paperclip to
I have a model Foo which have a ForeignKey to the User model. Later,
Let's say I have a model like this class Foo(db.Model): id = db.StringProperty() bar
Background : I have created this UserControl. In the constructor of the user control
I have an existing SQL Server database, where I store data from large specific

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.