WaYdotNET Web Blogs

Il blog di Carlo Bertini e qualcosa di .NET
posts - 57, comments - 2796, trackbacks - 925

My Links

News

Tag Cloud

Article Categories

Archives

Post Categories

Image Galleries

ASP.NET

Caxxate

NHibernate Templates for Smart Code Generator

Introduction

To learn more about Smart Code please read the next article, by clicking here.

The sample code and templates, are based in the next article NHibernate Best Practices with ASP.NET . In this excellent article, Billy McCafferty, describes best practices for leveraging the benefits of NHibernate 1.2, ASP.NET.

For this article we'll try to be original.....and we'll use the Northwind database as sample, but these examples will work with any database

Code Generation, a brief overview

The Smart Code tool makes possible the automatic generation of programs and components that interact with database systems. It works by reading a database schema, allowing the user to set certain extended properties for tables and columns, and applying templates to each table in order to generate code. The templates are themselves programs that access the Smart Code Object Model to produce tailored programs and components. Although Smart Code comes with a set of basic templates, users may edit these or create their own to suit their particular project needs. Moreover, templates may be written in C# or VB.NET (or theoretically in any .NET language that supports the creation of dynamic-link libraries).

Quick Start Guide

Smart Code is a very powerful tool, and perhaps the best way to learn how to use it is to see a sample application running and then go back and examine which features of Smart Code were responsible for the application's functionality.

  • On the web.config and modify the connection.connection_string value
  • Play with the application, open up different pages and entering some data.
  • Open the Newin.scp project with the last release of Smart Code.
  • Compile the NHibernateTemplates and WebTemplates and Load the dlls into Smart Code.
  • Change some properties in Newin.scp project, this will show you the effect of different attribute settings and template assignments.

 

 

info:

http://www.codeproject.com/useritems/NHibernate_Templates.asp

Technorati Tags:

Print | posted on venerdì 3 agosto 2007 14:24 |

Feedback

Gravatar

# re: NHibernate Templates for Smart Code Generator

and we'll use the Northwind database as sample, but these examples will work with any database
17/04/2015 11:24 | http://www.pedrostory.fr
Gravatar

# re: NHibernate Templates for Smart Code Generator

I like to get up early to go out and breathe fresh air. I feel that it is good for health and a good habit
Return Man 3
27/07/2018 08:56 | fdhd
Gravatar

# re: NHibernate Templates for Smart Code Generator

Your blog is meaningful, I have read many other blogs but your blog has persuaded me, I hope in the coming time you will have more great blogs to share with readers.
run 3
11/10/2018 13:23 | mi ka
Comments have been closed on this topic.

Powered by:
Powered By Subtext Powered By ASP.NET