Using 5.6, decided to start a project on Net Core...with the adapter templates.
I think there are two things that I don't understand.
1. The pre-processor directive in DataAccessAdapter for NETSTANDARD2_0 doesn't seem to be working for me (on VS2017 or VS2019). The project that I generated is set to .NET Core 2.0 but is choosing to compile the ConfigFileHelper line, which fails because ReadConnectionStringFromConfig does not exist in the .NET Standard 2.0 ORMSupportClasses. The ConfigFileHelper class exists but is empty (which I assume is fine because if the directive were working for me it would not be using the ConfigFileHelper class anyway.)
I solved this by removing this code and only leaving the RuntimeConfiguration line and then hooked it up in the Startup.cs of the project that consumes the data project.
private static string ReadConnectionStringFromConfig()
// return ConfigFileHelper.ReadConnectionStringFromConfig(ConnectionStringKeyName);
And in Startup.cs
RuntimeConfiguration.AddConnectionString("ConnectionString.SQL Server (SqlClient)", "connection string");
// Configure the DQE
c => c.SetTraceLevel(TraceLevel.Verbose)
This all works fine but of course when I regen the code, I have to go back in and modify the ReadConnectionStringFromConfig method.
Curious if there are other steps, such as a VS setting, to get the pre-processor directive to work?
2. I assume that I can have the consuming project set to a higher version of .NET Core (2.2 in this case) than the LLBLGen project (which is set to 2.0). I'm assuming so since it compiles and works fine with the changes I made above.