Click or drag to resize

IDataApiMigrate(String, Object, Boolean) Method

Note: This API is now obsolete.

Migrate an Data Object with a specified ID. This method allows add or update a data object with a specified ID without using generated ID from system. Note: if canUpdateIfExist = false then the method will throw exception the specified ID already exits in DB

Namespace: Casewhere.Runtime.DSL.Api
Assembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.8.5.0
Syntax
C#
[ObsoleteAttribute("Move to new Migrate(string id, object data, DslMigrationOption option) api")]
void Migrate(
	string id,
	Object data,
	bool canUpdateIfExist = false
)

Parameters

id  String
Id of the Data Object to be updated or added
data  Object
Data to be updated or added
canUpdateIfExist  Boolean  (Optional)
canUpdateIfExist flag indicates whether to update the data object if it have already exist. Default value: false
Example
C#
var dataApi = ctx.Use<IDataApi>();
dataApi.Migrate(orderId, new 
{
    Total = 20,
    BillingAddress = "123 Sunset Blvd"
},
true);
See Also