Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> 'SqlClientFactory' could not be found
 

Pages: 1
LLBLGen Pro Runtime Framework
'SqlClientFactory' could not be found
Page:1/1 

  Print all messages in this thread  
Poster Message
TBarn
User



Location:
Grand Rapids
Joined on:
21-Nov-2019 20:02:18
Posted:
1 posts
# Posted on: 21-Nov-2019 20:08:04.  
I am trying to configure LLBL to work in a Blazor App (Net Core 3) using Self-Servicing. The LLBL project is generated to .Net Standard 2.1 and is referenced by the Blazor App. I have added these Nuget packages to the Blazor app:

SD.LLBLGen.Pro.DQE.SqlServer and
SD.LLBLGen.Pro.ORMSupportClasses (both of them are version 5.6.1).

The LLBL project has the Nuget package SD.LLBLGen.Pro.DQE.SqlServer (5.6.1) installed.
In the Startup.cs file of the Blazor app, I have included this line:

// Configure the DQE
RuntimeConfiguration.ConfigureDQE<SQLServerDQEConfiguration>(
                                c => c.SetTraceLevel(TraceLevel.Verbose)
                                        .AddDbProviderFactory(typeof(System.Data.SqlClient.SqlClientFactory))
                                        .SetDefaultCompatibilityLevel(SqlServerCompatibilityLevel.SqlServer2012));

This is in the Configure method just after I set up the connection strings. The startup.cs file has these using statements:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using ChemicalInv.Data;
using SD.LLBLGen.Pro.ORMSupportClasses;
using SD.LLBLGen.Pro.DQE.SqlServer;
using System.Diagnostics;

The problem is I get an error on the .AddDbProviderFactory(typeof(System.Data.SqlClient.SqlClientFactory)) statement.

Error:

The type name 'SqlClientFactory' could not be found in the namespace 'System.Data.SqlClient'. This type has been forwarded to assembly 'System.Data.SqlClient, Version=4.6.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Consider adding a reference to that assembly.

What am I doing wrong?

Nevermind - I just needed to add the Nuget Package System.Data.SqlClient    - duh!
Tom Barney  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8098 posts
# Posted on: 22-Nov-2019 07:19:16.  
Good you figured it out Regular Smiley

David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.