C
C#2w ago
hutonahill

Trying to scaffold a MySQL database with Rider

I am trying to scaffold a MySQL database. I am using Rider. I found this article on the MySQL website: https://dev.mysql.com/doc/connector-net/en/connector-net-entityframework-core-scaffold-example.html but the commands it uses seems to require Visual Studio which i am not using. then i found this article from Jetbrains themselves: https://blog.jetbrains.com/dotnet/2022/01/31/entity-framework-core-inside-rider-ui-way/#alternatives
The JetBrains Blog
Entity Framework Core Inside Rider: UI Way | The .NET Tools Blog
Do you work with Entity Framework Core? Would you like to manage entities right inside your IDE? Then you're in luck! JetBrains Rider helps you effectively manage everything you need in EF Core with e
29 Replies
hutonahill
hutonahill2w ago
but when i open the menu i see this:
No description
hutonahill
hutonahill2w ago
instead of this:
hutonahill
hutonahill2w ago
What am i missing? This documentation looks like its for an older version of Rider, where can i find the current version? found another article
hutonahill
hutonahill2w ago
The JetBrains Blog
Running Entity Framework (Core) commands in Rider | The .NET Tools ...
A while back, we received a very interesting question: how can we run Entity Framework commands like adding migrations or updating the database, in Rider?@JetBrainsRider how do I run EF commands i
hutonahill
hutonahill2w ago
this one had me run a version of this command in the terminal:
dotnet ef dbcontext scaffold "connection string" MySql.EntityFrameworkCore -c filename
dotnet ef dbcontext scaffold "connection string" MySql.EntityFrameworkCore -c filename
this thrw this error: No project was found. Change the current working directory or use the --project option. i messed around with it for a bit and eventualy found the right directory though trial and error now i get this error:
System.PlatformNotSupportedException: The option 'IntegratedSecurity' is not currently supported.
System.PlatformNotSupportedException: The option 'IntegratedSecurity' is not currently supported.
followed my a massive stack trace starting with MySql.Data.MySqlClient.MySqlConnectionStringBuilder.<>c.<.cctor>b__0_18(MySqlConnectionStringBuilder msb, MySqlConnectionStringOption sender, Object value) i have no idea what this IntegratedSecurity is or where i enabled it ok, ive done some more looking https://downloads.mysql.com/docs/connector-net-en.pdf (page 32) found this reference to IntegratedSecurity. looks like it enables windows authentication for connecting to the server. not sure if this is a featue of the database or a feature of my connection yet. this bit (page 29) implies to me that this is somthing to do with the MySQLConnecter package on the .NET side. which means i need to figure out how to modify the command to disable this idenfityer
## Options for Classic MySQL Protocol Only

Options related to systems using a connection pool appear together at the end of the list of general options
(see Connection-Pooling Options). Connector/NET 8.0 exposes the options in this section as properties in
the MySql.Data.MySqlClient.MySqlConnectionStringBuilder class.

**General Options.** The Connector/NET options that follow are for general use with connection strings
and the options apply to all MySQL server configurations:
## Options for Classic MySQL Protocol Only

Options related to systems using a connection pool appear together at the end of the list of general options
(see Connection-Pooling Options). Connector/NET 8.0 exposes the options in this section as properties in
the MySql.Data.MySqlClient.MySqlConnectionStringBuilder class.

**General Options.** The Connector/NET options that follow are for general use with connection strings
and the options apply to all MySQL server configurations:
hutonahill
hutonahill2w ago
EF Core tools reference (.NET CLI) - EF Core
Reference guide for the Entity Framework Core .NET Core CLI tools
hutonahill
hutonahill2w ago
cant find anything that would let me disable IntegratedSecurity but i did find a bunch of other useful stuff well. I cant find anything else Ah, i am an idiot, its in the connectiron string ok, new issue. its built and it looks like ive got a conflict:
hutonahill
hutonahill2w ago
No description
hutonahill
hutonahill2w ago
which of these do i use? for the moment i am using Microsoft.EntityFrameworkCore. but i dont actualy know which is best here
Anton
Anton2w ago
The other one won't work
Unknown User
Unknown User2w ago
Message Not Public
Sign In & Join Server To View
jcotton42
jcotton422w ago
there's another provider that's much better iirc
Unknown User
Unknown User2w ago
Message Not Public
Sign In & Join Server To View
hutonahill
hutonahill2w ago
MsSQL being Microsoft SQL Server? but also i am locked into MySQL unfortunately
Want results from more Discord servers?
Add your server