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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:14:13+00:00 2026-05-11T05:14:13+00:00

I am setting up an n-tier application with MVC, Ninject, and NHibernate (my first

  • 0

I am setting up an n-tier application with MVC, Ninject, and NHibernate (my first using these technologies). For clarity’s sake, the tiers are a ‘Data’ tier, a ‘Services’ tier, and a ‘Web’ tier (all are separate projects).

With MVC, you have your models that are in the ‘Models’ folder. It seems necessary to put my models here to create strongly-typed Views and to generally keep with the philosophy of MVC.

However, with NHibernate, I also need my models in the ‘Data’ tier so that the mapping can take place and that NHibernate can instantiate actual objects to return to the services layer.

Duplicating the classes across projects is not very DRY and abstracting them into their own library doesn’t seem to play well with MVC (neither in practice nor philosophy).

Any thoughts? How do you structure your O/RM objects vs MVC models?

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-11T05:14:13+00:00Added an answer on May 11, 2026 at 5:14 am

    I keep Entity Framework models/classes in the data tier and use the Models folder of the MVC project for presentation models and model binders.

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

Sidebar

Related Questions

What is the best practice of setting the DacUpgradeOptions.IgnoreDataLoss property in automatic Data-Tier Application
Setting onchange event for CheckBoxList using the following code doesn't work. chkListUserGroup.Attributes.Add(onchange, document.forms[0].isRecordModified.value='true';); How
Setting the scene: My asp.net web application carries a version number which is incremented
Setting up the sandboxes for all these option is not feasible right now. So
I am developing a medium sized ASP.NET project using ASP.NET MVC and Entity Framework.
setting up shiro session cache with ehcache+terracotta ,putitng these configs in config.groovy - security.shiro.sessionDAO
I have a superclass Entity in a logic-tier project within existing 3-tier core application
I have a classic 3-tier ASP.Net 3.5 web application with forms that display business
Setting up SVN using Apple Developer Connection manual ( http://developer.apple.com/mac/articles/server/subversionwithxcode3.html ). Regardless of it,
I am developing a 3-tier application (not 3-layer!) with a client application running 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.