'Declaration
Public Shared Function AsUpdatable(Of T)( _ ByVal view As View(Of T) _ ) As View(Of T)
Parameters
- view
- The view to specify as updatable.
Type Parameters
- T
- The type of the elements in the view.
'Declaration
Public Shared Function AsUpdatable(Of T)( _ ByVal view As View(Of T) _ ) As View(Of T)
This method is used with Join operation to specify which of the two parts of the join you want to be updatable.
Properties exposed by a view can be updatable or read-only. Updatable properties of a view can be modified directly in the view. Read-only properties of a view cannot be modified directly in the view, but they still reflect up-to-date values of the source, so the difference is often not critical, you can always modify corresponding property in the source, that will automatically change the property in the view.
Only one of the two arguments of a Join can be updatable, the one you qualified with AsUpdatable(). In absence of this qualification, both parts of the join are read-only. For example, in from c in customers.AsLive() join o in orders.AsLive().AsUpdatable() on o.CustomerID equals c.CustomerID select new { c.CustomerName, o.OrderDate, o.OrderAmount }
CustomerName is read-only, and OrderDate and OrderAmount are updatable.