I am using sql server 2008. I got this error message "Cannot implicitly convert type 'int' to 'XDocImportSvc.Models.CorvelRequest" when i tried to update a record, couldn't figure out what the problem is. Please help.
public CorvelRequest InsertCorvelRequest(CorvelRequest item)
{
if (item.Id > 0)
{
return _db.CorvelRequest.Update(item);
}
else
{
return _db.CorvelRequest.Insert(item);
}
}
Insert works. i can insert it to the DB , but update failed. I also tried UpdateById, got the same error. item is the same for both insert and update except for update Id is not 0.
I am using sql server 2008. I got this error message "Cannot implicitly convert type 'int' to 'XDocImportSvc.Models.CorvelRequest" when i tried to update a record, couldn't figure out what the problem is. Please help.
Insert works. i can insert it to the DB , but update failed. I also tried UpdateById, got the same error. item is the same for both insert and update except for update Id is not 0.