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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:28:22+00:00 2026-05-13T19:28:22+00:00

What is the best way to generate C# classes for use with Castle ActiveRecord

  • 0

What is the best way to generate C# classes for use with Castle ActiveRecord and NHibernate given an existing database structure?

Can you recommend any of the class generation tools or is it just less hassle to write the classes by hand?

  • 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-13T19:28:22+00:00Added an answer on May 13, 2026 at 7:28 pm

    If you only have a handful of tables with not many columns, it may be best to write your classes by hand. I wouldn’t recommend hand writing many classes though if your database already exists.

    Active Writer may meet your needs: http://using.castleproject.org/display/Contrib/ActiveWriter

    There are other code generators in various states of usefulness. There are other questions in this vane on StackOverflow. Here are a couple:

    .NET ORM solution with class auto-generation: Subsonic, Castle AR, …?

    NHibernate Generators

    Update June 01, 2010:

    I have now publicly released a (T4 based) code generator for Castle ActiveRecord as a Windows application:

    http://www.AgilityForORMs.com/Home/Products/

    There are both free and commercial versions of the code generator. The free version should work just fine for the majority of “green field” databases that follow certain conventions (for example: using surrogate primary keys).

    The AgilityForORMs Castle ActiveRecord code generator has been tested against .NET 3.5 and MS SQL Server 2005/2008. Support for other database vendors, as well as .NET 4.0, is planned.

    I wouldn’t have written this code generator if I would have found one “off the shelf” that I was happy with. I figured I may as well spend some extra time packaging it up so other people could benefit as well.

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

Sidebar

Related Questions

What is the best way to generate an HTTP session ID and avoid collisions
What's the best way to generate 5 random non duplicating integers from 0 -
What is the best way to represent a byte array as an XSD schema?
I want to use the SIFWorks ADK, a java library, with my appengine project.
I am using Ruby on Rails 3 and I would like to handle models
Hello All I am writing some software that will allow users to create their
So I have an interesting situation. I've inherited a big mess of code where
I am in the process of starting to write a Java library to implement
I am working on a project which has a lot of JavaScript. I think
Here's the situation: I have an abstract class with a constructor that takes a

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.