CodeSmith Community
Your Code. Your Way. Faster!

NativeType to SqlDbTypeAlias Type Map

Latest post 01-10-2008 3:48 PM by Khaos. 2 replies.
  • 01-09-2008 12:00 PM

    • Khaos
    • Top 75 Contributor
    • Joined on 06-03-2005
    • CodeSmith Padawan
    • Posts 58
    • Points 886

    Cool [H] NativeType to SqlDbTypeAlias Type Map

    After talking with Eric on this we determined there was no existing map to Convert the .NativeType to SslDbType.  Since I was crying the loudest at the time Stick out tongue I took a few minutes and made the map. 

    NativeType-SqlDbTypeAlias.csmap

    Hope this helps the community or at least saves some time.

    Usage:

     <%@ Map Name="SqlDbTypeAlias" Src="NativeType-SqlDbTypeAlias" Description="NativeType- to C# SqlDbTypeAlias Type Map" %>
    SqlDbType.<%= SqlDbTypeAlias[SourceTable.NonPrimaryKeyColumns[iCount].NativeType] %>

    Joe Johnston
    • Post Points: 35
  • 01-10-2008 3:27 PM In reply to

    • ejsmith
    • Top 10 Contributor
    • Joined on 12-28-2002
    • Dallas, TX USA
    • Posts 2,196
    • Points 922,330

    Re: NativeType to SqlDbTypeAlias Type Map

    Awesome!  Thanks for posting that.  If you don't mind, we will get it added into the install.

    Eric J. Smith
    CodeSmith Tools, LLC
    Chief Software Architect

    • Post Points: 35
  • 01-10-2008 3:48 PM In reply to

    • Khaos
    • Top 75 Contributor
    • Joined on 06-03-2005
    • CodeSmith Padawan
    • Posts 58
    • Points 886

    Re: NativeType to SqlDbTypeAlias Type Map

    That would be awesome.  Glad to be able to contribute.

     

    Joe Johnston
    • Post Points: 5
Page 1 of 1 (3 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems