C# Class WhippedCream.DataServiceDataLayer.WhippedCreamUpdatableContext

WCF Data Services has a provider that uses reflection in order to find the Entity Sets and Operations your repository exposes. In order for that provider to manage entity relationships, the data service the provider is reflecting over needs to inherit from IUpdatable. If it does not, then entity relationships are not managed. I actually don't know exactly what happens if the service dosen't inherit from IUpdatable but everything works when I do.
Inheritance: IUpdatable
Mostrar archivo Open project: KCL5South/WhippedCream Class Usage Examples

Public Methods

Method Description
GetType ( string fullTypeName ) : System.Type

A Utility method used to retrieve a System.Type from a type name.

GetType ( string containerName, string fullTypeName ) : System.Type

A Utility method used to retrieve a System.Type from a type name.

IUpdatable ( ) : void
IUpdatable ( object targetResource ) : void
IUpdatable ( object targetResource, string propertyName, object resourceToBeAdded ) : void
SaveEntity ( ODataOperation operation, object entity ) : void

This method is called when pending changes on an entity need to be persisted to the backing store.

WhippedCreamUpdatableContext ( IUnityContainer container ) : System.Collections

Constructor.

Private Methods

Method Description
IUpdatable ( System query, string fullTypeName ) : object
IUpdatable ( object resource ) : object
IUpdatable ( object targetResource, string propertyName ) : object
IUpdatable ( string containerName, string fullTypeName ) : object

Method Details

GetType() public method

A Utility method used to retrieve a System.Type from a type name.
public GetType ( string fullTypeName ) : System.Type
fullTypeName string The full type name.
return System.Type

GetType() public abstract method

A Utility method used to retrieve a System.Type from a type name.
public abstract GetType ( string containerName, string fullTypeName ) : System.Type
containerName string The name of the entity set that is serving the type.
fullTypeName string The full type name.
return System.Type

IUpdatable() public method

public IUpdatable ( ) : void
return void

IUpdatable() public method

public IUpdatable ( object targetResource ) : void
targetResource object
return void

IUpdatable() public method

public IUpdatable ( object targetResource, string propertyName, object resourceToBeAdded ) : void
targetResource object
propertyName string
resourceToBeAdded object
return void

SaveEntity() public abstract method

This method is called when pending changes on an entity need to be persisted to the backing store.
public abstract SaveEntity ( ODataOperation operation, object entity ) : void
operation ODataOperation The type of operation the save is envoking.
entity object The entity to perform the save on.
return void

WhippedCreamUpdatableContext() public method

Constructor.
public WhippedCreamUpdatableContext ( IUnityContainer container ) : System.Collections
container IUnityContainer The IOC Container used for dependency injection.
return System.Collections