Estou tentado estudar EF com Code First. Estou recebendo esta exceção no SaveChanges()
An unhandled exception of type System.Data.Entity.Infrastructure.DbUpdateException occurred in EntityFramework.dll
Additional information: An error occurred while updating the entries. See the inner exception for details.
Outro problema seria quando tento criar outra classe para servir como tabela, recebo uma exceção chamada InvalidOperationException
segue a stack trace
An unhandled exception of type 'System.InvalidOperationException' occurred in EntityFramework.dll
Additional information: The model backing the 'SchoolContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).
Properties
da classeStudent
e rodou!ctx.Professores.Add(prof)
recebo uma exceçao An unhandled exception of type 'System.InvalidOperationException' occurred in EntityFramework.dll Additional information: The model backing the 'SchoolContext' context has changed since the database was created. Consider using Code First Migrations to update the database ([go.microsoft.com/fwlink/?LinkId=238269]).