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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:38:00+00:00 2026-06-17T02:38:00+00:00

I have a project with an existing database which was initially created for a

  • 0

I have a project with an existing database which was initially created for a legacy application. It works fine, but over time quite a few of the tables / fields have been lost or under-utilized, but the historical data MAY be useful someday so they’re not going anywhere.

Enter 2012 (’13) and Entity Framework 5, an ORM with built in POCO generation (Nice Add!). So bang.. Get a connection to the Oracle Database, gen. up a context and some POCO’s.. suh-weet!! But wait.. my POCO’s arent really the POCO’s I would like to deal with… There’s a bunch of fields which i dont need anymore (not to say I’ll NEVER need them, but i can’t know for sure), so now i’ve got these POCO’s which are basically bloated table mappers… So what should I do.

I see a few solutions here..

1). I could throw them around and only use the fields that I need.

2). I could get into the Model Surface and start axing the unused fields.

3). “Code-First” approach and tie the objects into the existing DB, it’s a large DB though (i’m pretty sure this is possible, right?)

4). Create my own POCO / DTO’s in it’s own model project and these will essentially become my “domain model”, but the mapping back into the context could be painful..

Lastly, do these POCO’s / DTO’s need to be in their own project?? What is there REALLY to gain.. seeing things like “YAGNI”, i feel like it can sit right under the .edmx and never bother anyone..

On a side note, i will be needing a few of these via JSON too, so the whole serializable ability needs to be considered..

Can i just partial class the generated POCO’s and only “Attribute” the properties I’ll be needing?

anyhow, it’d be great to hear from past experience, or thoughts on the matter..

I could see this being in Programmers, but i figured I’d start it here.

  • 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-17T02:38:02+00:00Added an answer on June 17, 2026 at 2:38 am

    We have a very similar situation, a large legacy DB2 database of which we need small portions of specific tables for our applications.

    To do this we used entity framework code first models for the relevant subsections of data we were interested in. This meant we could do a few important things:

    • remove irrelevant data from the model to make code more discoverable
    • rename fields inside our model and map them to names that make sense in the app rather than existing column names
    • reduce the volume of data pulled back by queries (ie our selects dont grab all the extra bits)
    • where 2 formats of data exist use the modern standard rather than historical format

    This works out really well for us, however a couple of things to note:

    • if you are writing make sure you include all required fields in the model
    • you can generate you CF classes but you will have to trim them a bit
    • generating from non mssql can sometimes be more tricky

    In terms of json serialisation we do this too however we use a different model for this and use automapper to translate. You should in most cases be able to serialise without needing to add extra attributes but if they are required you can just add them to your pocos alongside any ef attributes.

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

Sidebar

Related Questions

I have an existing project that builds fine using my IDE. I'd like to
I have an existing project repo which I use for project A, and has
I have taken over an existing project written beautifully in SQL with many useful
We have an existing Firebird database which we wish to setup in an ASP.NET
We currently have a Database Project, which we wrote a WIX Installer for to
I am creating application in which I would have database which users can´t edit.
I have an existing project, so I need a solid way of cleaning/checking user
I have an existing project written in Ruby on Rails. It is sort of
I have an existing project that consumes web services. One was added as a
I have a simple task. I have an existing project with a web service

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.