Reputation: 459
I am following John Papa's tutorial. When I edit speaker and save, I get following exception. I am very new to this. I really appreciate if someone can point me what I am missing. Thank you!
ExceptionMessage=Field not found: 'Breeze.ContextProvider.EntityInfo.AutoGeneratedKey'.
ExceptionType=System.MissingFieldException
StackTrace= at System.Web.Http.ApiController.<InvokeActionWithExceptionFilters>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__0.MoveNext()
POST URL/breeze/Breeze/SaveChanges HTTP/1.1
Host: URL
Connection: keep-alive
Content-Length: 580
Accept: application/json, text/javascript, */*; q=0.01
Origin: URL
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
Content-Type: application/json
Referer: URL
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
{"entities":[{"Id":28,"FirstName":"Mary","LastName":"Block","Email":"[email protected]","Blog":"http://glennb.contoso.com","Twitter":"@gblock","Gender":"M","ImageSource":"glenn_block.jpg","Bio":"Father, Husband, Spiritualist, Software geek, Change agent, REST Head","__unmapped":{"isPartial":false,"isSpeaker":true},"entityAspect":{"entityTypeName":"Person:#CC.Model","defaultResourceName":"Persons","entityState":"Modified","originalValuesMap":{"IsPartial":true,"FirstName":"Glenn"},"autoGeneratedKey":{"propertyName":"Id","autoGeneratedKeyType":"Identity"}}}],"saveOptions":{}}
Upvotes: 1
Views: 924
Reputation: 61
Right, you will need that update:
You can use the Package Manager Console and run the following line to CC.DataAccess project: PM> Install-Package Breeze.Server.ContextProvider.EF6
https://www.nuget.org/packages/Breeze.Server.ContextProvider.EF6
My regards
Upvotes: 2