EntityDataSource.StoreOriginalValuesInViewState Propriedade

Definição

Obtém ou define um valor que indica se os dados da fonte de dados devem ser armazenados em estado de exibição para certificar-se de que os dados não sejam alterados por outro processo antes de serem atualizados ou excluídos.Gets or sets a value that indicates whether the data from the data source should be stored in view state to make sure that the data has not been changed by another process before it is updated or deleted.

public:
 property bool StoreOriginalValuesInViewState { bool get(); void set(bool value); };
public bool StoreOriginalValuesInViewState { get; set; }
member this.StoreOriginalValuesInViewState : bool with get, set
Public Property StoreOriginalValuesInViewState As Boolean

Valor da propriedade

Boolean

true Se os valores forem armazenados em estado de exibição; caso contrário, false .true if the values will be stored in view state; otherwise, false. O valor padrão é true.The default value is true.

Comentários

Para controlar as alterações quando as operações de atualização e exclusão estão habilitadas, o EntityDataSource controle deve armazenar informações sobre os valores originais dos objetos carregados no ControlState .To track changes when update and delete operations are enabled, the EntityDataSource control must store information about original values of loaded objects in the ControlState. Armazenar essas informações necessárias no estado de exibição aumentará o tamanho da página.Storing this required information in the view state will increase the page size. Você pode desabilitar o armazenamento de valores originais no estado de exibição definindo a StoreOriginalValuesInViewState propriedade como false .You can disable storing original values in the view state by setting the StoreOriginalValuesInViewState property to false. Se você fizer isso, o Entity Framework não poderá rastrear a simultaneidade em objetos atualizados.If you do this, the Entity Framework cannot track concurrency in updated objects. Para obter mais informações, consulte atualizando dados (EntityDataSource).For more information, see Updating Data (EntityDataSource).

Aplica-se a