Updates the geven TData instances in the C1 storage.
If any property values in any of the TData instances, these would be saved into the storage.
This method triggers the events OnBeforeUpdate and OnAfterUpdate for each item in items
Namespace: Composite.DataAssembly: Composite (in Composite.dll) Version: 5.3.6135.33083
Syntax
C# |
---|
public void Update<TData>(
IEnumerable<TData> items
)
where TData : class, IData
|
Visual Basic |
---|
Public Sub Update(Of TData As {Class, IData}) ( _
items As IEnumerable(Of TData) _
) |
Visual C++ |
---|
public:
generic<typename TData>
where TData : ref class, IData
void Update(
IEnumerable<TData>^ items
) |
Type Parameters
Examples
CopyC#
using (DataConnection connection = new DataConnection())
{
IEnumerable<IMyDataType> myDataTypes =
from d in connection.Get<IMyDataType>()
where d.Value > 10
select d;
foreach (IMyDataType in myDataTypes)
{
myDataType.Value += 10;
}
connection.Update<IMyDataType>(myDataTypes);
}
See Also