EntityTypeBuilder does not contain a definition for ToTable in EF Core

前端 未结 12 1456
南笙
南笙 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:30

    Depending on your .Net version you are using. Microsoft.EntityFrameworkCore.Tools.DotNet only supports .NetStandard >= 2.0.

    If your .Net version is 4.6.1, update Microsoft.EntityFrameworkCore to 2.0.0-preview1-final, along with related EntityFramework DLLs, then close Visual Studio 2017 and re-open.

提交回复
热议问题