Dear all,
I am newbie to CodeSmith and use the freeware version for the time
being until I get familiar with this nice tool.
I wonder if someone can help to create a template to generate a strongley
typed classes which represesnt all the Database objects constants.
Examles:
1) Northwind.Tables.Customer (provides the Customer table constant, "Customer")
2) Northwind.Tables.Customer.Columns.CustomerId (provides the CustomerId column constant, "CustomerId").
3) Norhtwind.StoredProcedures.GetEmployee.Parameters.EmployId (provides the EmployId parameter constant, "@EmployId").
4) Northwind.StoredProcedures.GetEmployee.Parameters.EmployId.Size (provides the EmployId parameter size, 15)
and so on.
I think having one class to encapsulate all the database constants including
objects names, datatypes, sizes and other details, can save a lot
of type when referring to these constants from any layer, and specially the
DAL layer.
Looking forward to hear from you guys.
Thanks
Daniel