linq2db.aspnet configuration
See original GitHub issueHi,
I’m trying migrate my configurations to linq2db.aspnet and I use custom mapping schema convertors. Which options are there?
before:
MappingSchema.Default.SetConverter<string, JArray>(JsonConvert.DeserializeObject<JArray>);
services.AddLinqToDbContext<BrandCloudDb>((provider, options) =>
{
var schema = new MappingSchema();
schema.SetConverter<string, JArray>(JsonConvert.DeserializeObject<JArray>);
options
.UseSqlServer(Configuration.GetConnectionString("BcConnection"))
.UseDefaultLogging(provider)
.UseMappingSchema(schema);
});
Is there better solutions or is it right?
Thank you!
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Configuring LINQ To DB for ASP.NET Core
Configuring LINQ To DB for ASP.NET Core. Available since: 3.0.0-rc.0. In this walkthrough, you will configure an ASP.NET Core application to access a...
Read more >linq2db.AspNet 4.0.0-preview.5
LINQ to DB ASP.NET Core Extensions adds ability to configure ASP.NET Core application for Linq To DB usage.
Read more >GitHub - linq2db/linq2db: Linq to database provider.
This method lets you configure your mapping dynamically at runtime. Furthermore, it lets you to have several different configurations if you need so....
Read more >c# - linq2db exception: "Configuration string is not provided ...
I keep getting the error when I run a test which uses linq2db: LinqToDB.LinqToDBException : Configuration string is not provided. I guess it's ......
Read more >[Fix]-How could i manage multiple database in linq2db
How to configure multiple ASPNETCORE_ENVIRONMENT on same machine? How can you use multiple directories for static files in an aspnet core app? How...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
What is the problem? You have created new MappingSchena, defined converter. This is right way.
Don’t forget to cache mapping schema. Otherwise you will slowdown your queries.