I am using MySQL and I need to loop through all the names of the schemas in MySQL and then return back as an array to allow me to loop through the names. How do I achieve this using LINQ?
var optionsBuilderForServerData = new DbContextOptionsBuilder<DataContext>()
.UseMySql("server=localhost; user=user; password=password",
new MySqlServerVersion(new Version(8, 0, 21)));
DataContext serverDataContext = new DataContext(optionsBuilderForServerData.Options);
var databaseNames = serverDataContext. // what do I type here to view all database names?
If Linq does not have this ability, is there a way to achieve this using .SqlQuery() method?