I get the following error when I migrate my ASP.NET Core MVC from 2.2 to 3.0
SqlException: Invalid column name 'ContractProfileContractId'.
My statement which throws the error:
var totalemployees = _context.EmployeeProfile.Where(x => x.Active == true).ToList();
When I add the column ContractProfileContractId to the Employees table, the apps works, but I need to add more and more columns for other tables.
I started coding this app in .NET Core 1.1 (2017), migrated it to 2.0, 2.1 and 2.2 (1 year ago) and now to 3.0.
I tried 3.1 migration and same problem exists.
The application passed the login screen without any error. The error appears only after trying to query from the database using EF.
Any ideas?