Flushes pending changes to the underlying database.

Namespace:  Mindscape.LightSpeed
Assembly:  Mindscape.LightSpeed (in Mindscape.LightSpeed.dll)
Version: 4.0.0.0 (4.0.0.0)

Syntax

C#
void SaveChanges()
Visual Basic (Declaration)
Sub SaveChanges

Examples

CopyC#
// Prepare changes to the database in the unit of work
var customer = unitOfWork.FindOne<Customer>(Entity.Attribute("Name") == "Arthur Wellesley");
customer.Name = "The Duke of Wellington";
unitOfWork.Add(new Customer { Name = "Gertrude Perkins" });
unitOfWork.Add(new Dogsbody { Name = "S Baldrick" });
unitOfWork.Remove(unitOfWork.FindOne<Customer>(Entity.Attribute("Name") == "Lord Smedley");
// Save the changes to the database
unitOfWork.SaveChanges();

See Also