Page 1 of 1

Kann nicht von 'String' in 'Microsoft.EntityFrameworkCore.Serversion konvertieren

Posted: 11 Apr 2025, 19:23
by Anonymous
Ich verwende C# und habe einen Fehler:

Code: Select all

Argument 2: cannot convert from 'string' to 'Microsoft.EntityFrameworkCore.ServerVersion'

Code: Select all

    using Microsoft.EntityFrameworkCore;
using System;

namespace Infrastructure
{
public class BotContext : DbContext
{
public DbSet Servers { get; set; }

protected override void OnConfiguring(DbContextOptionsBuilder options)
=> options.UseMySql("server=localhost;user=root;port=3306;Connect Timeout=5;");

public class Server
{
public ulong Id { get; set; }
public string Prefix { get; set; }
}
}
}