Saving Entities and Entity Lists
Saving a Single Entity
To save a single entity, just call the SaveEntity() method of your business object, passing the entity to be saved. If you don't specify an entity, then the business object's default entity (stored in its Entity property) is saved.For example, in C#:
Employee e = new Employee();
EmployeeEntity employee = e.GetEmployeeByID(1);
employee.Title = "President";
mmSaveDataResult result = e.SaveEntity(employee);
And in VB .NET:
Dim e As Employee = New Employee()
Dim employee As EmployeeEntity = e.GetEmployeeByID(1)
employee.Title = "President"
Dim result As mmSaveDataResult = e.SaveEntity(employee)
Saving a List of Entities
To save a list of entities, just call the SaveEntityList() method of your business object, passing the entity list to be saved. If you don't specify an entity list, then the business object's default entity list (stored in its EntityList property) is saved.For example, in C#:
Employee e = new Employee();
mmBindingList<EmployeeEntity> employeeList = e.GetEmployeesByRegion("WA");
foreach (EmployeeEntity employee in employeeList)
{
employee.Region = "CA";
}
mmSaveDataResult result = e.SaveEntityList(employeeList);
And in VB .NET:
Dim e As Employee = New Employee()
Dim employeeList As mmBindingList(Of EmployeeEntity) = e.GetEmployeesByRegion("WA")
For Each employee As EmployeeEntity In employeeList
employee.Region = "CA"
Next
Dim result As mmSaveDataResult = e.SaveEntityList(employeeList)
© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 04/26/18
Comment or report problem with topic
