Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Asp.net Core Creating a new Controller using Entity Framework

$
0
0

Hi, 

I have a model with some attributes and I am creating a new controller based on that model using entity framework but it throws me a error as: "There is no entity type EnquiryModel on DbContext ProjectName.Data.ApplicationDbContext"

I also tried to add my model into applicationDbcontext using : 

public DbSet<EnquiryModel> EnquiryModel { get; set; }

Rebuild the solution , but it still give me the same error.

Any solution ?

Thanks in advance.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>