I am not very familiar with this area, so I referred your question to the product manager who covers it. Thanks for passing on the information about the broken link.
I did get this summary from our documentation (from an internal chatbot we’re testing).
To use the .NET Entity Framework with SingleStoreDB, you can follow these steps:
Make sure you have installed the required dependencies1. You will need the latest 6.0.x version of .NET Core.
Install the MySql.Data and MySql.Data.Entity packages from NuGet, as they work with SingleStoreDB, which is compatible with the MySQL binary protocol2.
Depending on your setup, use an appropriate connection string for SingleStore Cloud3 or SingleStore Self-Managed4, and modify it with your specific settings (server, port, user ID, password, and database).
Here’s a simplified example of how to set up a connection using Entity Framework:
csharp
using System.Data.Entity;
using MySql.Data.Entity;
[DbConfigurationType(typeof(MySqlEFConfiguration))]
public class MyDbContext : DbContext
{
public MyDbContext() : base("Server=localhost;port=3306;User ID=s2user;Password=tK_,mh&Hq-EnN;Database=dbtest")
{
// your constructor logic here
}
public DbSet<YourModel> YourModels { get; set; }
}
Replace YourModel with the name of the model class you have defined.
Finally, you can follow the tutorials and examples provided by the SingleStoreDB documentation to perform CRUD operations and read operation examples563.
Please note that this answer assumes you are using Entity Framework Core, which is the latest edition. If you are using Entity Framework (not Core) on the .NET Framework, the process should still be similar, but you may need to modify the example code and references accordingly.
Thanks @hanson for the reply and the forward; the internal documentation still refers to the older way. In the meantime there is a specific core library for .net and I presume that this new library is used under the hood in the new NuGet Gallery | EntityFrameworkCore.SingleStore 6.0.2-beta package. But because the GitHub link is not available (https://github.com/memsql/SingleStore.EntityFrameworkCore) I cannot check the status of the implementation.
So it would be nice if I could talk to the product manager or dev who is responsible for the implementation. Thanks!