This white paper discusses the use of automatic programming to streamline code generation for NHibernate applications, enabling developers to produce error-free mapping files and business object class files efficiently. It emphasizes eliminating redundant code through the use of stored procedures in SQL Server, which automate the generation of necessary components based on database schema. The paper concludes with the potential for future enhancements to the code-generation process, allowing for more complex relationships and improved development productivity.