IDwTable.UpdateWhere Property
.NET Standard 2.x
Gets or sets an enumerated value of the DwUpdateWhere
enumeration indicating which columns will be included in the WHERE clause of the UPDATE statement.
This property is used in .NET DataStore.
Namespace: DWNet.Data
Assembly: DWNet.Data.dll
Syntax
DwUpdateWhere UpdateWhere { get; set; }
Property Value
The enumerated value of the DwUpdateWhere
enumeration indicating which columns will be included in the WHERE clause of the UPDATE statement. This value can impact performance or cause data loss when more than one user accesses the same table at the same time.
This property value will be converted to UpdateWhereStrategy when used in .NET DataStore to build the WHERE clause of the UPDATE statement.
From (DwUpdateWhere) | To (UpdateWhereStrategy) |
---|---|
Key | KeyColumns |
KeyAndUpdatableColumns | KeyAndConcurrencyCheckColumns |
KeyAndModifiedColumns | KeyAndModifiedColumns |
Remarks
.NET DataStore uses this property to decide which columns will be included in the WHERE clause of the UPDATE statement, instead of using UpdateWhereStrategyAttribute
applied to the model.
Examples
The following code example demonstrates how to get the DataWindow.Table.UpdateWhere property.
using DWNet.Data;
using System;
namespace Appeon.ApiDoc.IDwTableExamples
{
public class UpdateWhereExample
{
private readonly SchoolContext _context;
public UpdateWhereExample(SchoolContext context)
{
_context = context;
}
public void Example()
{
// Creates a new DataStore object.
IDataStore course = new DataStore("d_course", _context);
// Gets the DataWindow.Table.UpdateWhere property.
var updateWhere = course.DwMeta.DataWindow.Table.UpdateWhere;
Console.WriteLine("Update Where = {0}", updateWhere.ToString());
/*This code produces the following output:
Update Where = KeyAndUpdatableColumns
*/
}
}
}
Applies to
.NET Standard
2.x