Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

what does public int SaveChanges(); return in EF4?

I see my entity has this method, which I have used successfully.  But I am not yet checking the returned value.

Does anyone know what's returned on success? How about on failure?

Also, if TryUpdateModel(myModel) succeeds, is there any chancce of failure?

Thanks,
newbieweb
ASKER CERTIFIED SOLUTION
Avatar of ChetOS82
ChetOS82
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of curiouswebster

ASKER

So it seems there's no reason for me to inspect the returned value other than having one more text to verify success.  By that I mean if I updated 1 record, the return vaue should be 1.  If not, throw my own exception.

Is that logical?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks.