Codefirst的实体框架迁移错误

时间:2019-10-13 15:36:32

标签: c# entity-framework entity-framework-6 migration code-first

我正在尝试使用postgresql在我的项目中启用迁移,但是在包管理器控制台中运行Enable-Migrations时遇到此错误。我已经尝试过卸载并重新安装实体框架。

Enable-Migrations : Cannot bind argument to parameter 'Path' because it is null.
At line:1 char:1
+ Enable-Migrations
+ ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Enable-Migrations], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Enable-Migrations

DbContext:

using System.Data.Entity;

namespace HalfPugg.Models
{
    public class HalfPuggContext : DbContext
    {
        public HalfPuggContext() : base("Half-Pugg")
        {

        }

        public DbSet<Gamer> Gamers { get; set; }

        public DbSet<Game> Games { get; set; }

        public DbSet<Classification_Gamer> Classification_Gamers { get; set; }

        public DbSet<Match> Matches { get; set; }

        public DbSet<Classification_Game> Classification_Games { get; set; }

        public DbSet<Classification_Match> Classification_Matchs { get; set; }

        public DbSet<Filter> Filters { get; set; }

        public DbSet<Group> Groups { get; set; }

        public DbSet<Hall> Halls { get; set; }

        public DbSet<HashTag> HashTags { get; set; }

        public DbSet<Label> Labels { get; set; }

        public DbSet<MessageGamer> MessageGamers { get; set; }

        public DbSet<MessageGroup> MessageGroups { get; set; }

        public DbSet<MessageHall> MessageHalls { get; set; }

        public DbSet<Numbered> Numbereds { get; set; }

        public DbSet<Range> Ranges { get; set; }

        public DbSet<RequestedGroup> RequestedGroups { get; set; }

        public DbSet<RequestedHall> RequestedHalls { get; set; }

        public DbSet<RequestedMatch> RequestedMatchs { get; set; }

        public DbSet<Template> Templates { get; set; }

    }
}

0 个答案:

没有答案