DataContext.Refresh does not update the object

I have a datacontext where, after communicating with the database, I perform the following operation:

private DAL.Client _client;
public void ReloadCurrentClient()
        {
            DBContext.Refresh(RefreshMode.OverwriteCurrentValues, _client);
        }

I expected this method to return the client object back for synchronization with the database, but for some reason _client.Relationship (which is a set of relationships) is not updated. Could you give me information about where I am here?

+3
source share
1 answer
public void ReloadCurrentClient()
        {
            DBContext.Refresh(RefreshMode.OverwriteCurrentValues,DBContext.Clients );

        }

- entity.I , DBContext - , - . DAL . , 's' name.so DBContext.Clients. , .

+1

Source: https://habr.com/ru/post/1766733/


All Articles