The problem is that EF does not know what your stored procedure does, how to do this? This work is done on SQL Server. Therefore, after executing your stored procedure, you need to ask EF to update this (and other sibling) instance by issuing the Refresh() call:
context.Refresh(RefreshMode.StoreWins, myObject);
StoreWins tells the framework to overwrite the values ββin the instance with the values ββfrom the database.
Codinggorilla
source share