I work on one project in ASP.NET MVC3. Everything worked fine, until I created new table Price_Ranges. I then tried to get data using LINQ, the following code:
IEnumerable<PriceRange> priceRanges = from pr in dbContext.PriceRanges join cat in dbContext.Categories on pr.Category_Id equals cat.Id where cat.Id==categoryId select pr;
Then I use this IEnumerable in my view.
dbContext is EFDbContext class and everything is ok width it.
When I try to run this, it shows me exception:
System.Data.SqlClient.SqlException: Invalid object name 'dbo.PriceRanges'.
Is there anything I should do so asp.net recognize newly created tables in database?
How can I solve this problem.
Thanks in advance,