When I want to create a controller I get this error:
There was an error running the selected code generator:
'Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Db.ContextOptions'1[DATAMain.DB] while attempting to activate 'DataMain.DB'
DB.cs
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataMain
{
public class DB : IdentityDbContext<IdentityUser, IdentityRole, string>
{
public DB(DbContextOptions<DB> options) : base(options)
{
}
public DbSet<Category> Categories { get; set; }
}
}
