in

CodeSmith Community

Your Code. Your Way. Faster!

DB Constants c#

Last post 10-01-2005 7:56 AM by dandon. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 10-01-2005 7:56 AM

    • dandon
    • Not Ranked
    • Joined on 10-01-2005
    • Posts 1
    • Points 5

    DB Constants c#

    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
    • Post Points: 5
Page 1 of 1 (1 items)
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems