I'm sitting with a client that has an external MySql database where I have full access.
The data in the database is updated/edited regularly so there are no intentions of getting the data into Umbraco backoffice. But there is a wish of displaying these data around the website.
Does anyone have knowledge/examples on to connect to an external MySql database, and displaying data in a view ?
I'm on an Umbraco 13.4.1.
j
Jemayn
09/09/2024, 11:53 AM
Looks like EF Core has MySQL support - https://learn.microsoft.com/en-us/ef/core/providers/?tabs=dotnet-core-cli
And it has tools to scaffold a db context and all the table models etc based on a connection to a db, so that would probably be the way that I would attempt it.
Don't personally have experience on this specific thing though 🙂
s
Sebastian Dammark
09/10/2024, 2:03 PM
I actually figured it out, in a simpler way using MySqlConnector(https://mysqlconnector.net/), and using AppCaches not to spam the database 🙂