Exception Description:
Capture to System.Data.Entity.Infrastructure.DbUpdateException
hresult=-2146233087
message= cannot update EntitySet "Cashrequest" because it has a definingquery, and the <ModificationFunctionMapping> element does not support the current operation < insertfunction> element.
Source=entityframework
StackTrace:
In System.Data.Entity.Internal.InternalContext.SaveChanges ()
In System.Data.Entity.Internal.LazyInternalContext.SaveChanges ()
In System.Data.Entity.DbContext.SaveChanges ()
At Core.servicebase ' 1.Add (T entity) position D:\WORK\LssNew\Core\ServiceBase.cs: line number 171
In Lss.App.Controllers.MechanicController.CashAction (Int32 Workerid, Double cashnum) Location d:\WORK\LssNew\Lss.App\ Controllers\mechaniccontroller.cs: Line No. 1201
InnerException:System.Data.Entity.Core.UpdateException
hresult=-2146232032
message= cannot update EntitySet "Cashrequest" because it has a definingquery, and the <ModificationFunctionMapping> element does not support the current operation < insertfunction> element.
Source=entityframework.sqlserver.
Exception reason and processing: the entity table in the database has no primary key, the update model is resolved after setting the primary key
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.