This project is read-only.

Editable Business Objects

The Editable Business Objects (EBO) enhancements has two objectives:
  • Implement IEditableObject
  • Keep originalvalues so that they can be delivered to the Circular Serializer

The project works together with 2 other projects (also included): Circular Serializer and PostSharp4EF. Together they offer effortless n-tier distributed usage of your domain layer, arguably the most important layer of your application. Read more about this here: full disconnected n-tier usage.

EBO is meant as a purely client side enhancement for objects.
More can be read here: and here: //

Given a simple Person object:
    [DataContract(Namespace = "myNamespace", Name = "Person")]
    public class Person
        public int PersonID { get; set; }
        public string Firstname { get; set; }
        public string Lastname { get; set; }

We can enhance this object by adding this attribute to it:

This triggers the following actions:
  • Implement the IEditableObject interface, which gives BeginEdit, CancelEdit and AcceptEdit methods
  • Rewrite all access to fields to pass through a method that will decide if a backup is necessary (when beginedit was called)
  • At canceledit, backups will be restored

In addition the following capabilities are added:
  • A dictionary for 'original values'
  • Allow straight access to the 'original values' that is used by the Circular Serializer

It is important to understand that this is never visible in Visual Studio. Your code remains untouched. The resulting dll is enhanced with these features

To use it's features, we can cast the object to IEditableObject and call the exposed methods.

Last edited Apr 16, 2008 at 8:24 PM by RBoeke, version 1


No comments yet.