CodeSmith Community
Your Code. Your Way. Faster!

CSLA .NET Templates and Enterprise Library Data Access Application Block

Latest post 07-17-2007 5:52 PM by Azavia. 0 replies.
  • 07-17-2007 5:52 PM

    • Azavia
    • Not Ranked
    • Joined on 07-17-2007
    • Posts 2
    • Points 10

    CSLA .NET Templates and Enterprise Library Data Access Application Block

    Hello,

     

    I have been working on porting the templates to use the enterprise Library Data Access application block instead of manually using the SQLClient connections, commands, etc. Thus far, it is going very well.

     

    However, I'm stuck on this. Right now it's adding parameters with

     

    cm.Parameters.AddWithValue("@ParameterName", value);

     

    That's not going to work for the daab.

     

    I think I should be able to easily convert it, except for the DbType. Is there any easy way that I can dynamically get the appropriate DbType to use as an argument to Database.AddInParameter and Database.AddOutParameter?

     

    Or am I out of luck here?

     

    If I can get this working I think it'll be an amazing increase in productivity for how much code it generates; well either way i twill be, just otherwise I'll need to convert each object manually.

     

    By the way I'll be happy to share my changes if anyone's interested. In fact, I'll attach it. Note though that I've only modified the C# templates, and a couple of them like the switchable object aren't done yet. And the transactions using ADO.NET transactions are far from perfect because I like using TransactionalAttribute instead.m

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