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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:09:37+00:00 2026-05-26T05:09:37+00:00

How should one go about setting up seed data while developing an nhibernate web

  • 0

How should one go about setting up seed data while developing an nhibernate web application? (It’s Mvc)

Should I just create a method and have it fire during application load (when it debug mode), and simply comment it out when I don’t need it?

or is there a better way?

  • 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-26T05:09:38+00:00Added an answer on May 26, 2026 at 5:09 am

    I suggest looking at something like AutoPoco.

    AutoPoco replaces manually written object mothers/test data builders
    with a fluent interface and an easy way to generate a large amount of
    readable test data. By default, no manual set-up is required,
    conventions can then be written against the names/types of property or
    manual configuration can be used against specific objects.

    The primary use cases are

    • Creating single, valid objects for unit tests in a standard manner across all tests
    • Creating large amounts of valid test data for database population

    This is not tied directly to NHibernate – you could in theory combine it with any data-layer that can persist POCO’s.

    I’d avoid adding code to Application_Start though – that sounds like a recipe for accidentally trashing your production database. You’d be better off creating a simple console application that you can run whenever you want to reseed your database.

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

Sidebar

Related Questions

Should one create unit tests involving IO? Ie, testing a class method for serializing/deserializing
I have a question about best practices regarding how one should approach storing complex
How should one split up the controllers in an ASP.NET MVC site? For example,
How much should one DataSet represent? Using the example of an ordering system: While
In what situations should one catch java.lang.Error on an application?
What return type should one return from a method that is getting rows from
Where should one go to be kept updated on all of the security flaws/problems
When should one use a scripting language over a more verbose, compiled language like
How should one ensure correctness when multiple processes access one single SQLite database file?
Why should one go for Windows Installer XML (WiX) when we have in built

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.