C# Class ExoModel.EntityFramework.EntityFrameworkModelTypeProvider.EntityModelType

Inheritance: ReflectionModelType
Mostra file Open project: vc3/ExoModel

Private Properties

Property Type Description
DeferOwnerDetection void
GetEntityState System.Data.EntityState
GetProperty System.Reflection.PropertyInfo
RaiseOnSave void

Public Methods

Method Description
GetObjectContext ( ) : IEntityContext

Gets or creates the object context for the current scope of work that corresponds to the current EntityModelType.

Protected Methods

Method Description
ConvertToList ( ModelReferenceProperty property, object list ) : System.Collections.IList
EntityModelType ( string @namespace, Type type, string scope, string format ) : System
GetEligibleProperties ( ) : IEnumerable

Override to ensure that entity key properties are excluded from the model.

GetId ( object instance ) : string

Gets the string identifier of the specified instance.

GetInstance ( string id ) : object

Gets or creates the instance for the specified id.

GetIsDeleted ( object instance ) : bool

Gets the deletion status of the specified instance indicating whether the instance has been permanently deleted.

GetIsModified ( object instance ) : bool

Gets the underlying modification status of the specified instance, indicating whether the instance has pending changes that have not been persisted.

GetIsPendingDelete ( object instance ) : bool

Indicates whether the specified instance is pending deletion.

InitializeList ( ModelInstance instance, ModelReferenceProperty property ) : void

Initializes null list properties when updated via a call to ModelInstanceList.Add or ModelInstanceList.Update.

OnInit ( ) : void

Performs initialization of the model type outside of the constructor to avoid recursion deadlocks.

SaveInstance ( ModelInstance modelInstance ) : void
SetIsPendingDelete ( object instance, bool isPendingDelete ) : void

Sets whether the specified instance is pending deletion.

Private Methods

Method Description
DeferOwnerDetection ( ModelType type, EntityReferenceProperty property, System.Data.Metadata.Edm.NavigationProperty oneNavProp ) : void
GetEntityState ( object instance ) : System.Data.EntityState

Gets the EntityState of the specified instance.

GetProperty ( Type declaringType, string name ) : PropertyInfo
RaiseOnSave ( ModelInstance instance ) : void

Method Details

ConvertToList() protected method

protected ConvertToList ( ModelReferenceProperty property, object list ) : System.Collections.IList
property ModelReferenceProperty
list object
return System.Collections.IList

EntityModelType() protected method

protected EntityModelType ( string @namespace, Type type, string scope, string format ) : System
@namespace string
type System.Type
scope string
format string
return System

GetEligibleProperties() protected method

Override to ensure that entity key properties are excluded from the model.
protected GetEligibleProperties ( ) : IEnumerable
return IEnumerable

GetId() protected method

Gets the string identifier of the specified instance.
protected GetId ( object instance ) : string
instance object
return string

GetInstance() protected method

Gets or creates the instance for the specified id.
protected GetInstance ( string id ) : object
id string The identifier of an existing instance, or null to create a new instance
return object

GetIsDeleted() protected method

Gets the deletion status of the specified instance indicating whether the instance has been permanently deleted.
protected GetIsDeleted ( object instance ) : bool
instance object
return bool

GetIsModified() protected method

Gets the underlying modification status of the specified instance, indicating whether the instance has pending changes that have not been persisted.
protected GetIsModified ( object instance ) : bool
instance object
return bool

GetIsPendingDelete() protected method

Indicates whether the specified instance is pending deletion.
protected GetIsPendingDelete ( object instance ) : bool
instance object
return bool

GetObjectContext() public method

Gets or creates the object context for the current scope of work that corresponds to the current EntityModelType.
public GetObjectContext ( ) : IEntityContext
return IEntityContext

InitializeList() protected method

Initializes null list properties when updated via a call to ModelInstanceList.Add or ModelInstanceList.Update.
protected InitializeList ( ModelInstance instance, ModelReferenceProperty property ) : void
instance ModelInstance
property ModelReferenceProperty
return void

OnInit() protected method

Performs initialization of the model type outside of the constructor to avoid recursion deadlocks.
protected OnInit ( ) : void
return void

SaveInstance() protected method

protected SaveInstance ( ModelInstance modelInstance ) : void
modelInstance ModelInstance
return void

SetIsPendingDelete() protected method

Sets whether the specified instance is pending deletion.
protected SetIsPendingDelete ( object instance, bool isPendingDelete ) : void
instance object
isPendingDelete bool
return void