Im trying to create a my tables in my sql database using the code first approach and im getting the "No DbContext was found in assembly 'LibrarySystem'. Ensure that you're using the correct assembly and that the type is neither abstract nor generic." error in the package manager console
I have tried several different solutions for example the one shown in Migration: No DbContext was found in assembly
this is my Context class where im using dbcontext
using System.Collections.Generic;
using System.Text;
using IDataInterface;
using Microsoft.EntityFrameworkCore;
namespace DataAccess
{
public class LibraryContext : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer("Server = localhost; Database = Library; Trusted_connection = true");
}
public DbSet<Book> Books { get; set; }
public DbSet<Shelf> Shelves { get; set; }
}
}