hey so I have a asp.net core mvc app and for some reason suddenly it doesnt want to run anymore. it builds just fine but when i try to run it i get:
MissingMethodException: Method not found: 'Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping Microsoft.EntityFrameworkCore.Storage.TypeMappingSourceBase.FindMapping(System.Type, Microsoft.EntityFrameworkCore.Metadata.IModel)'.
MissingMethodException: Method not found: 'Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping Microsoft.EntityFrameworkCore.Storage.TypeMappingSourceBase.FindMapping(System.Type, Microsoft.EntityFrameworkCore.Metadata.IModel)'.
It says that it happens in my DbContext:
using Microsoft.EntityFrameworkCore;namespace realTimePolls.Models{ public class RealTimePollsContext : DbContext { public RealTimePollsContext(DbContextOptions<RealTimePollsContext> options) **: base(options) { }** <-- Error is here public DbSet<Poll> Polls { get; set; } public DbSet<User> User { get; set; } public DbSet<UserPoll> UserPoll { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity<Poll>().ToTable("poll"); // Maps the Poll entity to the "poll" table modelBuilder.Entity<User>().ToTable("user"); // Maps the User entity to the "user" table modelBuilder.Entity<UserPoll>().ToTable("userpoll"); // Maps the User entity to the "user" table } }}
using Microsoft.EntityFrameworkCore;namespace realTimePolls.Models{ public class RealTimePollsContext : DbContext { public RealTimePollsContext(DbContextOptions<RealTimePollsContext> options) **: base(options) { }** <-- Error is here public DbSet<Poll> Polls { get; set; } public DbSet<User> User { get; set; } public DbSet<UserPoll> UserPoll { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity<Poll>().ToTable("poll"); // Maps the Poll entity to the "poll" table modelBuilder.Entity<User>().ToTable("user"); // Maps the User entity to the "user" table modelBuilder.Entity<UserPoll>().ToTable("userpoll"); // Maps the User entity to the "user" table } }}