EntityTypeBuilder does not contain a definition for ToTable in EF Core

前端 未结 12 1467
南笙
南笙 2021-02-06 20:22

I have this sample code:

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Models;

namespace MySampleNamespace
{         


        
12条回答
  •  攒了一身酷
    2021-02-06 20:57

    It's also possible you have version discrepancies in your solution, so for example, if one of the projects in your dependency chain has a 3.1 version of EF Core and another project has a 2.1, then you will also see this error, and no matter what you install it won't work, instead make sure they are the same version in the entire solution.

提交回复
热议问题