John.Sheppard wrote:
Hello there,
I am learning LLBLGEN and I am using the SelfServicing method. My generated code is not creating any DbUtil Class. I am using V3 Beta.
DbUtils is no longer part of the generator code, it's code is moved to DaoBase and CommonDaoBase, please see the beta pdf doc, At the bottom under "Template changes -> Breaking changes -> General, selfservicing"
I have looked through the preferences and cannot see any options that might be related.
I am assuming the connection string is hard coded in there somewhere and there is a key in my App.config as follows;
<add key="ConnectionString.MySql (MySqlDirect)" value="Server=localhost;Database=mysql;User ID=root;Password=;"/>
Any thoughts on how I access the DbUtils class would be very appreciated! Maybe this is a change for V3, and silly noobs shouldn't be learning with it yet.
Thank you
Everyone is welcome, John and we all were novices at one point in time
The connection string isn't hardcoded in the code, the key is. The key is configurable in the project properties. With the key, the connection string is pulled from the application's app.config file (or web.config file).
So instead of using DbUtils.ActualConnectionString at runtime, you can use CommonDaoBase.ActualConnectionString, but as this is a global setting, it's recommended that you configure it through the config file of your application.