dotNet core (console app) with Enterprise Library Data (EnterpriseLibrary.Data.NetCore) and JSON
I am trying to use:
EnterpriseLibrary.Data.NetCore
.nugetpackagesenterpriselibrary.data.netcore6.0.1313
https://www.nuget.org/packages/EnterpriseLibrary.Data.NetCore/
.NET Core 2.1
I have the following JSON
{
"ConnectionStrings": {
"MyDefaultConnectionName": "Server=.\MyInstance;Database=MyDB;Trusted_Connection=True;MultipleActiveResultSets=true"
}
}
And this code works fine (in my Program.cs dotnet console app) (simple showing my appsettings.json is being picked up, and it looks like my connection-string json structure looks right.
using Microsoft.Extensions.Configuration;
IConfiguration config = new ConfigurationBuilder()
.SetBasePath(System.IO.Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.Build();
string conString = Microsoft
.Extensions
.Configuration
.ConfigurationExtensions
.GetConnectionString(config, "MyDefaultConnectionName");
Console.WriteLine("MyDefaultConnectionName.conString='{0}'", conString);
and I see:
MyDefaultConnectionName.conString='Server=.MyInstance;Database=MyDB;Trusted_Connection=True;MultipleActiveResultSets=true'
However, my attempt to use the code is failing:
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data;
using System.Data.Common;
public DataSet GetADataSet()
{
DataSet returnDs = null;
string sql = "Select * from dbo.MyTable";
try
{
DatabaseProviderFactory factory = new DatabaseProviderFactory();
Database db = DatabaseFactory.CreateDatabase("MyDefaultConnectionName");
DbCommand dbc = db.GetSqlStringCommand(sql);
returnDs = db.ExecuteDataSet(dbc);
}
catch (Exception ex)
{
string temp = ex.Message;
throw ex;
}
return returnDs;
}
The exception is:
Exception while running 'Select * from dbo.MyTable' ('MyDefaultConnectionName') ('Database provider factory not set for the static DatabaseFactory. Set a provider factory invoking the DatabaseFactory.SetProviderFactory method or by specifying custom mappings by calling the DatabaseFactory.SetDatabases method.')
I found this link....
Microsoft.Practices.EnterpriseLibrary.Data.DLL but was not handled in user code
to "older" pre dotnet core xml based.
I've been too the project website
https://github.com/Chavoshi/EnterpriseLibrary.NetCore
but cannot find a working example
.....
in regards to my line of code above:
DatabaseProviderFactory myFactory= new DatabaseProviderFactory();
and the error message:
DatabaseFactory.SetProviderFactory
myFactory does not have a method SetProviderFactory
........
I tried this...(but I know it really isn't the same as the xml attribute (future readers, don't waste your time with the below json)
{
"ConnectionStrings": {
"MyDefaultConnectionName": "Server=.\MyInstance;Database=MyDB;Trusted_Connection=True;MultipleActiveResultSets=true",
"providerName": "System.Data.SqlClient"
}
}
What is the magic syntax sugar for using
https://github.com/Chavoshi/EnterpriseLibrary.NetCore
with a dotnet core console app? WITH JSON
APPEND:
Based on the comments, I also have chased this example:
https://github.com/Chavoshi/EnterpriseLibrary.NetCore/tree/master/Examples
The one example there is xml based, not json based.
c# .net-core enterprise-library
|
show 7 more comments
I am trying to use:
EnterpriseLibrary.Data.NetCore
.nugetpackagesenterpriselibrary.data.netcore6.0.1313
https://www.nuget.org/packages/EnterpriseLibrary.Data.NetCore/
.NET Core 2.1
I have the following JSON
{
"ConnectionStrings": {
"MyDefaultConnectionName": "Server=.\MyInstance;Database=MyDB;Trusted_Connection=True;MultipleActiveResultSets=true"
}
}
And this code works fine (in my Program.cs dotnet console app) (simple showing my appsettings.json is being picked up, and it looks like my connection-string json structure looks right.
using Microsoft.Extensions.Configuration;
IConfiguration config = new ConfigurationBuilder()
.SetBasePath(System.IO.Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.Build();
string conString = Microsoft
.Extensions
.Configuration
.ConfigurationExtensions
.GetConnectionString(config, "MyDefaultConnectionName");
Console.WriteLine("MyDefaultConnectionName.conString='{0}'", conString);
and I see:
MyDefaultConnectionName.conString='Server=.MyInstance;Database=MyDB;Trusted_Connection=True;MultipleActiveResultSets=true'
However, my attempt to use the code is failing:
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data;
using System.Data.Common;
public DataSet GetADataSet()
{
DataSet returnDs = null;
string sql = "Select * from dbo.MyTable";
try
{
DatabaseProviderFactory factory = new DatabaseProviderFactory();
Database db = DatabaseFactory.CreateDatabase("MyDefaultConnectionName");
DbCommand dbc = db.GetSqlStringCommand(sql);
returnDs = db.ExecuteDataSet(dbc);
}
catch (Exception ex)
{
string temp = ex.Message;
throw ex;
}
return returnDs;
}
The exception is:
Exception while running 'Select * from dbo.MyTable' ('MyDefaultConnectionName') ('Database provider factory not set for the static DatabaseFactory. Set a provider factory invoking the DatabaseFactory.SetProviderFactory method or by specifying custom mappings by calling the DatabaseFactory.SetDatabases method.')
I found this link....
Microsoft.Practices.EnterpriseLibrary.Data.DLL but was not handled in user code
to "older" pre dotnet core xml based.
I've been too the project website
https://github.com/Chavoshi/EnterpriseLibrary.NetCore
but cannot find a working example
.....
in regards to my line of code above:
DatabaseProviderFactory myFactory= new DatabaseProviderFactory();
and the error message:
DatabaseFactory.SetProviderFactory
myFactory does not have a method SetProviderFactory
........
I tried this...(but I know it really isn't the same as the xml attribute (future readers, don't waste your time with the below json)
{
"ConnectionStrings": {
"MyDefaultConnectionName": "Server=.\MyInstance;Database=MyDB;Trusted_Connection=True;MultipleActiveResultSets=true",
"providerName": "System.Data.SqlClient"
}
}
What is the magic syntax sugar for using
https://github.com/Chavoshi/EnterpriseLibrary.NetCore
with a dotnet core console app? WITH JSON
APPEND:
Based on the comments, I also have chased this example:
https://github.com/Chavoshi/EnterpriseLibrary.NetCore/tree/master/Examples
The one example there is xml based, not json based.
c# .net-core enterprise-library
Did you check the example code?
– DavidG
Nov 12 '18 at 13:37
@DavidG. That helped a tad. I see some of the methods are static methods, not instance methods. But now I get : The connection string for the database 'DefaultConnection' does not exist or does not have a valid provider. See my "future readers" where I try to find the way to set the providerName in the json as one once did in the xml.
– granadaCoder
Nov 12 '18 at 13:48
@DavidG .. the example you gave....helped a tad. I'm pointing out that the example is xml based. see the sibling file : github.com/Chavoshi/EnterpriseLibrary.NetCore/blob/master/…
– granadaCoder
Nov 12 '18 at 13:50
Yes, I did see that example a few days ago. (the single example given at : github.com/Chavoshi/EnterpriseLibrary.NetCore/tree/master/… ) It is xml based. That's the main issue, what is the ~json~ magic sauce that makes the world happy.
– granadaCoder
Nov 12 '18 at 14:08
That's not Microsoft's Enterprise Library Data Access component's, that's someone's repo with cloned code and text. Why are you using it in the first place? When ADO.NET 2.0 came out it contained almost all of the old EntLib's data access patterns. As a result, Entlib Data was abandoned. Why useDatabaseFactory.CreateDatabasewhen ADO.NET provides its ownDbProviderFactories.GetFactory(providerName);etc ?
– Panagiotis Kanavos
Nov 12 '18 at 14:19
|
show 7 more comments
I am trying to use:
EnterpriseLibrary.Data.NetCore
.nugetpackagesenterpriselibrary.data.netcore6.0.1313
https://www.nuget.org/packages/EnterpriseLibrary.Data.NetCore/
.NET Core 2.1
I have the following JSON
{
"ConnectionStrings": {
"MyDefaultConnectionName": "Server=.\MyInstance;Database=MyDB;Trusted_Connection=True;MultipleActiveResultSets=true"
}
}
And this code works fine (in my Program.cs dotnet console app) (simple showing my appsettings.json is being picked up, and it looks like my connection-string json structure looks right.
using Microsoft.Extensions.Configuration;
IConfiguration config = new ConfigurationBuilder()
.SetBasePath(System.IO.Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.Build();
string conString = Microsoft
.Extensions
.Configuration
.ConfigurationExtensions
.GetConnectionString(config, "MyDefaultConnectionName");
Console.WriteLine("MyDefaultConnectionName.conString='{0}'", conString);
and I see:
MyDefaultConnectionName.conString='Server=.MyInstance;Database=MyDB;Trusted_Connection=True;MultipleActiveResultSets=true'
However, my attempt to use the code is failing:
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data;
using System.Data.Common;
public DataSet GetADataSet()
{
DataSet returnDs = null;
string sql = "Select * from dbo.MyTable";
try
{
DatabaseProviderFactory factory = new DatabaseProviderFactory();
Database db = DatabaseFactory.CreateDatabase("MyDefaultConnectionName");
DbCommand dbc = db.GetSqlStringCommand(sql);
returnDs = db.ExecuteDataSet(dbc);
}
catch (Exception ex)
{
string temp = ex.Message;
throw ex;
}
return returnDs;
}
The exception is:
Exception while running 'Select * from dbo.MyTable' ('MyDefaultConnectionName') ('Database provider factory not set for the static DatabaseFactory. Set a provider factory invoking the DatabaseFactory.SetProviderFactory method or by specifying custom mappings by calling the DatabaseFactory.SetDatabases method.')
I found this link....
Microsoft.Practices.EnterpriseLibrary.Data.DLL but was not handled in user code
to "older" pre dotnet core xml based.
I've been too the project website
https://github.com/Chavoshi/EnterpriseLibrary.NetCore
but cannot find a working example
.....
in regards to my line of code above:
DatabaseProviderFactory myFactory= new DatabaseProviderFactory();
and the error message:
DatabaseFactory.SetProviderFactory
myFactory does not have a method SetProviderFactory
........
I tried this...(but I know it really isn't the same as the xml attribute (future readers, don't waste your time with the below json)
{
"ConnectionStrings": {
"MyDefaultConnectionName": "Server=.\MyInstance;Database=MyDB;Trusted_Connection=True;MultipleActiveResultSets=true",
"providerName": "System.Data.SqlClient"
}
}
What is the magic syntax sugar for using
https://github.com/Chavoshi/EnterpriseLibrary.NetCore
with a dotnet core console app? WITH JSON
APPEND:
Based on the comments, I also have chased this example:
https://github.com/Chavoshi/EnterpriseLibrary.NetCore/tree/master/Examples
The one example there is xml based, not json based.
c# .net-core enterprise-library
I am trying to use:
EnterpriseLibrary.Data.NetCore
.nugetpackagesenterpriselibrary.data.netcore6.0.1313
https://www.nuget.org/packages/EnterpriseLibrary.Data.NetCore/
.NET Core 2.1
I have the following JSON
{
"ConnectionStrings": {
"MyDefaultConnectionName": "Server=.\MyInstance;Database=MyDB;Trusted_Connection=True;MultipleActiveResultSets=true"
}
}
And this code works fine (in my Program.cs dotnet console app) (simple showing my appsettings.json is being picked up, and it looks like my connection-string json structure looks right.
using Microsoft.Extensions.Configuration;
IConfiguration config = new ConfigurationBuilder()
.SetBasePath(System.IO.Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.Build();
string conString = Microsoft
.Extensions
.Configuration
.ConfigurationExtensions
.GetConnectionString(config, "MyDefaultConnectionName");
Console.WriteLine("MyDefaultConnectionName.conString='{0}'", conString);
and I see:
MyDefaultConnectionName.conString='Server=.MyInstance;Database=MyDB;Trusted_Connection=True;MultipleActiveResultSets=true'
However, my attempt to use the code is failing:
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data;
using System.Data.Common;
public DataSet GetADataSet()
{
DataSet returnDs = null;
string sql = "Select * from dbo.MyTable";
try
{
DatabaseProviderFactory factory = new DatabaseProviderFactory();
Database db = DatabaseFactory.CreateDatabase("MyDefaultConnectionName");
DbCommand dbc = db.GetSqlStringCommand(sql);
returnDs = db.ExecuteDataSet(dbc);
}
catch (Exception ex)
{
string temp = ex.Message;
throw ex;
}
return returnDs;
}
The exception is:
Exception while running 'Select * from dbo.MyTable' ('MyDefaultConnectionName') ('Database provider factory not set for the static DatabaseFactory. Set a provider factory invoking the DatabaseFactory.SetProviderFactory method or by specifying custom mappings by calling the DatabaseFactory.SetDatabases method.')
I found this link....
Microsoft.Practices.EnterpriseLibrary.Data.DLL but was not handled in user code
to "older" pre dotnet core xml based.
I've been too the project website
https://github.com/Chavoshi/EnterpriseLibrary.NetCore
but cannot find a working example
.....
in regards to my line of code above:
DatabaseProviderFactory myFactory= new DatabaseProviderFactory();
and the error message:
DatabaseFactory.SetProviderFactory
myFactory does not have a method SetProviderFactory
........
I tried this...(but I know it really isn't the same as the xml attribute (future readers, don't waste your time with the below json)
{
"ConnectionStrings": {
"MyDefaultConnectionName": "Server=.\MyInstance;Database=MyDB;Trusted_Connection=True;MultipleActiveResultSets=true",
"providerName": "System.Data.SqlClient"
}
}
What is the magic syntax sugar for using
https://github.com/Chavoshi/EnterpriseLibrary.NetCore
with a dotnet core console app? WITH JSON
APPEND:
Based on the comments, I also have chased this example:
https://github.com/Chavoshi/EnterpriseLibrary.NetCore/tree/master/Examples
The one example there is xml based, not json based.
c# .net-core enterprise-library
c# .net-core enterprise-library
edited Nov 12 '18 at 14:09
granadaCoder
asked Nov 12 '18 at 13:28
granadaCodergranadaCoder
14.8k55379
14.8k55379
Did you check the example code?
– DavidG
Nov 12 '18 at 13:37
@DavidG. That helped a tad. I see some of the methods are static methods, not instance methods. But now I get : The connection string for the database 'DefaultConnection' does not exist or does not have a valid provider. See my "future readers" where I try to find the way to set the providerName in the json as one once did in the xml.
– granadaCoder
Nov 12 '18 at 13:48
@DavidG .. the example you gave....helped a tad. I'm pointing out that the example is xml based. see the sibling file : github.com/Chavoshi/EnterpriseLibrary.NetCore/blob/master/…
– granadaCoder
Nov 12 '18 at 13:50
Yes, I did see that example a few days ago. (the single example given at : github.com/Chavoshi/EnterpriseLibrary.NetCore/tree/master/… ) It is xml based. That's the main issue, what is the ~json~ magic sauce that makes the world happy.
– granadaCoder
Nov 12 '18 at 14:08
That's not Microsoft's Enterprise Library Data Access component's, that's someone's repo with cloned code and text. Why are you using it in the first place? When ADO.NET 2.0 came out it contained almost all of the old EntLib's data access patterns. As a result, Entlib Data was abandoned. Why useDatabaseFactory.CreateDatabasewhen ADO.NET provides its ownDbProviderFactories.GetFactory(providerName);etc ?
– Panagiotis Kanavos
Nov 12 '18 at 14:19
|
show 7 more comments
Did you check the example code?
– DavidG
Nov 12 '18 at 13:37
@DavidG. That helped a tad. I see some of the methods are static methods, not instance methods. But now I get : The connection string for the database 'DefaultConnection' does not exist or does not have a valid provider. See my "future readers" where I try to find the way to set the providerName in the json as one once did in the xml.
– granadaCoder
Nov 12 '18 at 13:48
@DavidG .. the example you gave....helped a tad. I'm pointing out that the example is xml based. see the sibling file : github.com/Chavoshi/EnterpriseLibrary.NetCore/blob/master/…
– granadaCoder
Nov 12 '18 at 13:50
Yes, I did see that example a few days ago. (the single example given at : github.com/Chavoshi/EnterpriseLibrary.NetCore/tree/master/… ) It is xml based. That's the main issue, what is the ~json~ magic sauce that makes the world happy.
– granadaCoder
Nov 12 '18 at 14:08
That's not Microsoft's Enterprise Library Data Access component's, that's someone's repo with cloned code and text. Why are you using it in the first place? When ADO.NET 2.0 came out it contained almost all of the old EntLib's data access patterns. As a result, Entlib Data was abandoned. Why useDatabaseFactory.CreateDatabasewhen ADO.NET provides its ownDbProviderFactories.GetFactory(providerName);etc ?
– Panagiotis Kanavos
Nov 12 '18 at 14:19
Did you check the example code?
– DavidG
Nov 12 '18 at 13:37
Did you check the example code?
– DavidG
Nov 12 '18 at 13:37
@DavidG. That helped a tad. I see some of the methods are static methods, not instance methods. But now I get : The connection string for the database 'DefaultConnection' does not exist or does not have a valid provider. See my "future readers" where I try to find the way to set the providerName in the json as one once did in the xml.
– granadaCoder
Nov 12 '18 at 13:48
@DavidG. That helped a tad. I see some of the methods are static methods, not instance methods. But now I get : The connection string for the database 'DefaultConnection' does not exist or does not have a valid provider. See my "future readers" where I try to find the way to set the providerName in the json as one once did in the xml.
– granadaCoder
Nov 12 '18 at 13:48
@DavidG .. the example you gave....helped a tad. I'm pointing out that the example is xml based. see the sibling file : github.com/Chavoshi/EnterpriseLibrary.NetCore/blob/master/…
– granadaCoder
Nov 12 '18 at 13:50
@DavidG .. the example you gave....helped a tad. I'm pointing out that the example is xml based. see the sibling file : github.com/Chavoshi/EnterpriseLibrary.NetCore/blob/master/…
– granadaCoder
Nov 12 '18 at 13:50
Yes, I did see that example a few days ago. (the single example given at : github.com/Chavoshi/EnterpriseLibrary.NetCore/tree/master/… ) It is xml based. That's the main issue, what is the ~json~ magic sauce that makes the world happy.
– granadaCoder
Nov 12 '18 at 14:08
Yes, I did see that example a few days ago. (the single example given at : github.com/Chavoshi/EnterpriseLibrary.NetCore/tree/master/… ) It is xml based. That's the main issue, what is the ~json~ magic sauce that makes the world happy.
– granadaCoder
Nov 12 '18 at 14:08
That's not Microsoft's Enterprise Library Data Access component's, that's someone's repo with cloned code and text. Why are you using it in the first place? When ADO.NET 2.0 came out it contained almost all of the old EntLib's data access patterns. As a result, Entlib Data was abandoned. Why use
DatabaseFactory.CreateDatabase when ADO.NET provides its own DbProviderFactories.GetFactory(providerName); etc ?– Panagiotis Kanavos
Nov 12 '18 at 14:19
That's not Microsoft's Enterprise Library Data Access component's, that's someone's repo with cloned code and text. Why are you using it in the first place? When ADO.NET 2.0 came out it contained almost all of the old EntLib's data access patterns. As a result, Entlib Data was abandoned. Why use
DatabaseFactory.CreateDatabase when ADO.NET provides its own DbProviderFactories.GetFactory(providerName); etc ?– Panagiotis Kanavos
Nov 12 '18 at 14:19
|
show 7 more comments
1 Answer
1
active
oldest
votes
Thanks all for your explanations. As @panagiotis-kanavos also mentioned in the comments, adding JSON support to the library is a major change and needs a lot of efforts and for sure I cannot do it individually.
BTW I am going to somehow start the Enterprise Library Community and make it alive again -as I was (and am) a fan of it always, because I personally think it's really handy, specially in Exception Handling and Logging blocks- so absolutely adding JSON support will be one of the very first changes in the new major versions.
But for now this project is just to help the ones who want to convert their old projects to .Net Core with less challenges, without changing the infrastructure.
At the end, I appreciate if someone will help me on the community as I have started to discuss with Microsoft on this subject and waiting for their decision to let me update the official packages with the new versions in case if we are going to continue on updating the library.
Thanks for chiming in! Yeah, even after all these years with "cooler toys", I still like the compactness of EnterprieLibrary.Data. AddParameter, AddParameter and Execute syntax sugar.
– granadaCoder
Nov 16 '18 at 13:41
MohammadC, you may be interested in my post here: stackoverflow.com/questions/40845542/…
– granadaCoder
Nov 16 '18 at 13:41
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53263204%2fdotnet-core-console-app-with-enterprise-library-data-enterpriselibrary-data-n%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks all for your explanations. As @panagiotis-kanavos also mentioned in the comments, adding JSON support to the library is a major change and needs a lot of efforts and for sure I cannot do it individually.
BTW I am going to somehow start the Enterprise Library Community and make it alive again -as I was (and am) a fan of it always, because I personally think it's really handy, specially in Exception Handling and Logging blocks- so absolutely adding JSON support will be one of the very first changes in the new major versions.
But for now this project is just to help the ones who want to convert their old projects to .Net Core with less challenges, without changing the infrastructure.
At the end, I appreciate if someone will help me on the community as I have started to discuss with Microsoft on this subject and waiting for their decision to let me update the official packages with the new versions in case if we are going to continue on updating the library.
Thanks for chiming in! Yeah, even after all these years with "cooler toys", I still like the compactness of EnterprieLibrary.Data. AddParameter, AddParameter and Execute syntax sugar.
– granadaCoder
Nov 16 '18 at 13:41
MohammadC, you may be interested in my post here: stackoverflow.com/questions/40845542/…
– granadaCoder
Nov 16 '18 at 13:41
add a comment |
Thanks all for your explanations. As @panagiotis-kanavos also mentioned in the comments, adding JSON support to the library is a major change and needs a lot of efforts and for sure I cannot do it individually.
BTW I am going to somehow start the Enterprise Library Community and make it alive again -as I was (and am) a fan of it always, because I personally think it's really handy, specially in Exception Handling and Logging blocks- so absolutely adding JSON support will be one of the very first changes in the new major versions.
But for now this project is just to help the ones who want to convert their old projects to .Net Core with less challenges, without changing the infrastructure.
At the end, I appreciate if someone will help me on the community as I have started to discuss with Microsoft on this subject and waiting for their decision to let me update the official packages with the new versions in case if we are going to continue on updating the library.
Thanks for chiming in! Yeah, even after all these years with "cooler toys", I still like the compactness of EnterprieLibrary.Data. AddParameter, AddParameter and Execute syntax sugar.
– granadaCoder
Nov 16 '18 at 13:41
MohammadC, you may be interested in my post here: stackoverflow.com/questions/40845542/…
– granadaCoder
Nov 16 '18 at 13:41
add a comment |
Thanks all for your explanations. As @panagiotis-kanavos also mentioned in the comments, adding JSON support to the library is a major change and needs a lot of efforts and for sure I cannot do it individually.
BTW I am going to somehow start the Enterprise Library Community and make it alive again -as I was (and am) a fan of it always, because I personally think it's really handy, specially in Exception Handling and Logging blocks- so absolutely adding JSON support will be one of the very first changes in the new major versions.
But for now this project is just to help the ones who want to convert their old projects to .Net Core with less challenges, without changing the infrastructure.
At the end, I appreciate if someone will help me on the community as I have started to discuss with Microsoft on this subject and waiting for their decision to let me update the official packages with the new versions in case if we are going to continue on updating the library.
Thanks all for your explanations. As @panagiotis-kanavos also mentioned in the comments, adding JSON support to the library is a major change and needs a lot of efforts and for sure I cannot do it individually.
BTW I am going to somehow start the Enterprise Library Community and make it alive again -as I was (and am) a fan of it always, because I personally think it's really handy, specially in Exception Handling and Logging blocks- so absolutely adding JSON support will be one of the very first changes in the new major versions.
But for now this project is just to help the ones who want to convert their old projects to .Net Core with less challenges, without changing the infrastructure.
At the end, I appreciate if someone will help me on the community as I have started to discuss with Microsoft on this subject and waiting for their decision to let me update the official packages with the new versions in case if we are going to continue on updating the library.
edited Nov 18 '18 at 3:49
answered Nov 14 '18 at 4:13
Mohammad ChavoshiMohammad Chavoshi
461311
461311
Thanks for chiming in! Yeah, even after all these years with "cooler toys", I still like the compactness of EnterprieLibrary.Data. AddParameter, AddParameter and Execute syntax sugar.
– granadaCoder
Nov 16 '18 at 13:41
MohammadC, you may be interested in my post here: stackoverflow.com/questions/40845542/…
– granadaCoder
Nov 16 '18 at 13:41
add a comment |
Thanks for chiming in! Yeah, even after all these years with "cooler toys", I still like the compactness of EnterprieLibrary.Data. AddParameter, AddParameter and Execute syntax sugar.
– granadaCoder
Nov 16 '18 at 13:41
MohammadC, you may be interested in my post here: stackoverflow.com/questions/40845542/…
– granadaCoder
Nov 16 '18 at 13:41
Thanks for chiming in! Yeah, even after all these years with "cooler toys", I still like the compactness of EnterprieLibrary.Data. AddParameter, AddParameter and Execute syntax sugar.
– granadaCoder
Nov 16 '18 at 13:41
Thanks for chiming in! Yeah, even after all these years with "cooler toys", I still like the compactness of EnterprieLibrary.Data. AddParameter, AddParameter and Execute syntax sugar.
– granadaCoder
Nov 16 '18 at 13:41
MohammadC, you may be interested in my post here: stackoverflow.com/questions/40845542/…
– granadaCoder
Nov 16 '18 at 13:41
MohammadC, you may be interested in my post here: stackoverflow.com/questions/40845542/…
– granadaCoder
Nov 16 '18 at 13:41
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53263204%2fdotnet-core-console-app-with-enterprise-library-data-enterpriselibrary-data-n%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Did you check the example code?
– DavidG
Nov 12 '18 at 13:37
@DavidG. That helped a tad. I see some of the methods are static methods, not instance methods. But now I get : The connection string for the database 'DefaultConnection' does not exist or does not have a valid provider. See my "future readers" where I try to find the way to set the providerName in the json as one once did in the xml.
– granadaCoder
Nov 12 '18 at 13:48
@DavidG .. the example you gave....helped a tad. I'm pointing out that the example is xml based. see the sibling file : github.com/Chavoshi/EnterpriseLibrary.NetCore/blob/master/…
– granadaCoder
Nov 12 '18 at 13:50
Yes, I did see that example a few days ago. (the single example given at : github.com/Chavoshi/EnterpriseLibrary.NetCore/tree/master/… ) It is xml based. That's the main issue, what is the ~json~ magic sauce that makes the world happy.
– granadaCoder
Nov 12 '18 at 14:08
That's not Microsoft's Enterprise Library Data Access component's, that's someone's repo with cloned code and text. Why are you using it in the first place? When ADO.NET 2.0 came out it contained almost all of the old EntLib's data access patterns. As a result, Entlib Data was abandoned. Why use
DatabaseFactory.CreateDatabasewhen ADO.NET provides its ownDbProviderFactories.GetFactory(providerName);etc ?– Panagiotis Kanavos
Nov 12 '18 at 14:19