using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
public static void Main()
using var context = new Context();
var query = context.Items;
public int Id { get; set; }
public string Desc { get; set; }
public class Context : DbContext
public DbSet<Item> Items { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
.UseMySql("server=localhost", MySqlServerVersion.LatestSupportedServerVersion)
.LogTo(Console.WriteLine, LogLevel.Information)
.EnableSensitiveDataLogging();