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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:20:08+00:00 2026-05-27T02:20:08+00:00

I’ve have quite small asp.net MVC 2 application to maintain/extend. Currently it uses hand

  • 0

I’ve have quite small asp.net MVC 2 application to maintain/extend. Currently it uses hand written stored procedures + application code for doing data access. Basically what it does is that it loads data and wraps it to POCOs.

Current implementation is tedious to maintain. Especially when I have to add new property – not to mention adding new class/table for doing CRUD. Application has separate caching that is also hard to maintain – and it has led to a few defects. I would love to get rid off that also.

I ‘ve started to thinking about switching to some ORM tool like NHibernate or Entity Framework.

I have very limited experience when it comes to ORM or data access in general. What are the best practices in this situation? What should I take in consideration before jumping to NHibernate/Entity? And what about the downsides?

  • 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-27T02:20:09+00:00Added an answer on May 27, 2026 at 2:20 am

    “Best practice” is one of my least favourite words – it’s often used to assign more importance to an opinion than it really merits…

    Having said that…

    First, choose your database access strategy; ORM is the current de-facto industry standard, and you’ve identified the front runners; see this thread for a comparison.

    Different database access methodologies trade off different things. The one your app currently uses provides a lot of detailed control over the queries and the way they are mapped to your domain – but at the expense of a lot of hand coding. It’s likely to provide the best performance, and the most flexibility; some would argue it’s the easiest to maintain because there’s no “magic” for developers to get their heads round.

    ORM solutions trade performance and control for shorter development and (some argue) easier maintenance. There’s a learning curve, and the intermediate layer of “magic” can make some problems harder to identify – the classic anti-pattern with ORM is “loading the entire database into memory”, but performance issues can also be tricky to debug. On the other hand, you reduce the overall amount of code, and make simple CRUD operations far easier to build. Developers with experience in ORM will find it easier to maintain; developers who are new to ORM will have to learn the framework.

    In general, I think the industry is moving to ORM for applications that don’t have extreme performance requirements; it’s becoming mainstream, and most developers we interview these days have experience with ORM. However, the learning curve can be quite steep, and there’s a definite chicken and egg – which ORM do you choose without having experience of them all? FWIW, I think Steven Lacy’s answer is on the money there…

    What you’re proposing is basically a refactoring. I’d recommend a process along the following lines:

    • pick a feature to refactor
    • make sure you have a automated tests to ensure it works with the current implementation
    • replace the current implementation with your chosen ORM
    • run your automated tests to ensure it still works
    • rinse and repeat.

    I would put at least as much effort into creating the tests as in the refactoring itself – and I would resist the urge to add new features until you’ve replaced the current implementation.

    Make sure your tests include performance and scalability testing.

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

Sidebar

Related Questions

I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I am currently running into a problem where an element is coming back from
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

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.