Use this skill to triage an incoming issue on the EF Core repo (bug report or feature request). Sets the issue type (bug/feature), assigns EF area labels, attempts to arrive at a minimal repro reproducing the bug, checks whether it represents a regression, finds possible duplicates, etc.
This skill covers triaging and reproducing incoming issues on the Entity Framework Core repository. To do so, read the issue in question (provided as input in the prompt), as well as any linked issues/code/resources, apply appropriate classifications and assignments, and for alleged bugs, try to arrive at a minimal repro. User-submitted bug reports frequently provide only fragmentary information and code snippets, forcing you to try to fill in the missing information in the effort to create a minimal repro; valuable information is frequently provided in free-form text, which you need to integrate into the repro as code.
The EF repo contains a set of "area" labels that express which part of EF is affected. Area labels always start with an area- prefix. You can see the canonical list of area labels at https://github.com/dotnet/efcore/labels?q=area-, or fetch them using the GitHub CLI with gh label list --search "area-" --repo dotnet/efcore.
area-sqlserver, area-cosmos...). However, if an issue affects all providers, do not add provider labels.area-cosmos and area-query.The minimal repro should be created as a completely separate console program, outside of the EF repo. Use the following as your starting point:
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
await using var context = new TestContext();
await context.Database.EnsureDeletedAsync();
await context.Database.EnsureCreatedAsync();
public class TestContext : DbContext
{
public DbSet<Blog> Blogs { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder
// Modify the following line to switch EF providers
.UseSqlServer(Environment.GetEnvironmentVariable("Test__SqlServer__DefaultConnection"))
.LogTo(Console.WriteLine, LogLevel.Information)
.EnableSensitiveDataLogging();
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
}
}
public class Blog
{
public int Id { get; set; }
public string Name { get; set; }
}
Once you've managed to reproduce the bug, work to make the repro as minimal as possible, removing any code that isn't absolutely necessary to triggering the bug:
<details> block, to not take up too much space (the summary should be "minimal repro").file:// or vscode://) links, as your answer will be posted online.