Peter Obike

Peter Obike

  • NA
  • 43
  • 2.7k

Unable to SaveChanges() after adding new fields to model&vie

Jul 29 2019 5:48 AM
I have just downloaded one of your project on webtimemanagement.
I have successfully run and all worked but when I tried to add new input via model and also in the view class I get error
 
{0}Int32 SaveChanges()
Inner Exception is {0}System.Data.Entity.Core.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Invalid column name 'ItemDesc'.
Invalid column name 'Quantity'.
Invalid column name 'Price'.
Invalid column name 'Amount'.
 
The three field truly are not in the database. Is there a way I can exclude them from saving because I only need to concatenate them and add them to a field that is in the database called Purpose/Reason.
 
Please help me, I am new to ASP.Net MVC 

Answers (3)