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