EF 5 beta: how to modify update query at runtime? RRS feed

  • Question

  • is it possible to override the default update query used by an EntityDataSource at runtime?

    i have a need to exclude a column from update when it is not changing because the bound telerik RadGrid control does not handle binary data (in this case pictures) the same way as other columns' data types - meaning that the data is no longer available after selecting. since the binary data update value is null when it does not change, and my column constraint is Not Null, an update error is generated. even without the contraint it would null it out, something i do not want.

    so, i can modify the update statement if possible. otherwise i have to create a mapped stored procedure to update the database. does ef5 still have an all or nothing policy on this matter in re crud? ie all crud operations have to be mapped to stored procedures if any is?

    i am not sure that getting the original data would help, but does entitydatasource cache it if viewstate is enabled?

    Saturday, May 5, 2012 9:22 PM