UseMySQL extension method is missing in DbContextOptionsBuilder
See original GitHub issueSteps to reproduce
In ConfigureServices when I try following:
// Add database Context
services.AddDbContext<ApplicationDbContext>(options =>
{
options.UseMySQL(Configuration.Get<AppOptions>().ConnectionStrings.MySqlProvider);
options.UseOpenIddict();
});
It doesn’t work. Due to DateTimeOffset issue in Sapient I am moving to Pomelo, but UseMySQL extension method is missing. In Sapient
using MySQL.Data.Entity.Extensions;
provided the needed extension.
The issue
UseMySQL extension method is missing.
Exception message:
error CS1061: 'DbContextOptionsBuilder' does not contain a definition for 'UseMySQL' and no extension method 'UseMy
SQL' accepting a first argument of type 'DbContextOptionsBuilder' could be found (are you missing a using directive or an assembly ref
erence?)
Further technical details
MySQL version: 5.7.17 Operating system: macOS Pomelo.EntityFrameworkCore.MySql version: 1.1.1
Other details about my project setup:
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
'DbContextOptionsBuilder' does not contain a definition for ...
Error CS1061 'DbContextOptionsBuilder' does not contain a definition for 'UseSqlServer' and no extension method 'UseSqlServer' accepting a first ...
Read more >How to solve 'DbContextOptionsBuilder' does not contain a ...
An easy fix for CS1061'DbContextOptionsBuilder' does not contain a definition for 'UseSqlServer' and no accessible extension method ...
Read more >Fix : DbContextOptionsBuilder does not contain a definition for ...
Fix : cs1061 DbContextOptionsBuilder does not contain a definition for UseSqlServer and no accessible extension method UseSqlServer ...
Read more >'DbContextOptionsBuilder' does not contain a definition for ...
The method ReadAsAsync is an extension method declared in the class HttpContentExtensions , which is in the namespace System.Net.Http in the library System.Net....
Read more >Can't build EntityFrameworkCore example
Trying to follow the example in the blog post. Initially just tried to integrate the example code into a site I was building,...
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
It’s case-sensitive,
UseMySql
Here’s an example
You must import: