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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:26:54+00:00 2026-05-14T16:26:54+00:00

In NHibernate, there is a method doing something like ThisOrThat.VeryfyMappings() (I don’t know the

  • 0

In NHibernate, there is a method doing something like ThisOrThat.VeryfyMappings() (I don’t know the exact definition of it since it was a while ago I last tried NHibernate…)

I recall seeing a blog post somewhere where the author showed how to do some similar testing in Entity Framework 4, but now I cant find it. So, how do I test my EF4 Code-Only mappings?

  • 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-14T16:26:55+00:00Added an answer on May 14, 2026 at 4:26 pm

    You should be able to apply the same approach as described in this blog post. It describes how to do this for Fluent NHibernate, but it should be pretty much the same for EF4.

    You’ll need to implement the Validate(The)Mappings method yourself, and regardless of whether you use the repository approach or go directly through the context the basic idea is the same: insert an object and retrieve it using a second repository/context to verify that all fields have been correctly transferred. Additional checks will be needed to verify references.

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

Sidebar

Related Questions

Using Castle ActiveRecord / NHibernate: Is there a way you can force an ICriterion
Is there any NHibernate Search library which doesn't require attributes on your entity properties?
considering the latest version of Entity framework as against NHibernate, is there a reason
I know there are non-standard frameworks such as commons-validator, and hibernate validator. I wanted
I've been looking at web frameworks like Rails, Grails, etc. I'm used to doing
In NHibernate 3.2 mapping by code, you can index a given field like so:
I'm trying to get distinct results using the Criteria API in NHibernate. I know
I have an NHibernate entity that looks like this: public class Offender { public
I've been playing with RavenDB recently and there is something that is annoying me
I'm using NHibernate 2, and I'd like to be able to do the following:

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.