I am new with .net framework, and i am stuck with this ApplicationDbContext, Here is sample of my code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
namespace Rocky.Data
{
public class ProjectDbContext:DbContext
{
public ProjectDbContext(DbContextOptions<ApplicationDbContext> options): base(options)
{
}
}
}
Your problem is the ApplicationDbContext is not a module it's the class name of the contractor. So replace the ApplicationDbContext with ProjectDbContext. and your problem with be solved.
Here is the code you:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
namespace Rocky.Data
{
public class ProjectDbContext:DbContext
{
public ProjectDbContext(DbContextOptions<ProjectDbContext> options): base(options)
{
}
}
}