Hi Derya Altuntas,
In order to work with persistent data an object scope is required. The object scope provides a working area for all database objects. I assume that the m_originalMunitionList
is a list of persistent objects, retrieved by executing a query against certain IObjectScope instance. You can use the following code to retrieve that IObjectScope:
IObjectScope scope = Database.GetContext(m_originalMunitionList)
Before you can perform any operations on the persistent objects, you need to start a transaction. This is done with the ITransaction.Begin()
method. Any modifications made to an object after beginning the transaction can be stored in the database by calling ITransaction.Commit()
. Performing the update operation inside the foreach loop would look like this:
(platformConfiguration.ConfigurationItemType == Constants.CONFIGURATION_ITEM_TYPE_SENSOR_RADAR)
platformConfiguration.SensorRadar = ((SensorRadar)m_cmbbx_loadAirRadar.SelectedItem);
You can begin and commit the transaction outside of the loop as well.
Additional useful information about the CRUD operations and Telerik OpenAccess ORM could be found in this article
. Hope that helps.
the Telerik team