Class EntityFrameworkSeltzrOptionsBuilder<TModel, TUser>
Options builder for an Entity Framework based API
Implements
Namespace: Seltzr.EntityFramework.Options
Assembly: Seltzr.EntityFramework.dll
Syntax
public class EntityFrameworkSeltzrOptionsBuilder<TModel, TUser> : SeltzrOptionsBuilder<TModel, TUser>, IOrmSeltzrOptionsBuilder<TModel, TUser> where TModel : class where TUser : class
Type Parameters
TModel
The model type that the API is being built for
TUser
The type of authenticated user context
Methods
Creates a child instance of the SeltzrOptionsBuilder<TModel, TUser> type sharing the given base options. When overriden in a derived class, this method can be used to ensure that the entire tree of SeltzrOptionsBuilder<TModel, TUser> objects share the same derived type
public override SeltzrOptionsBuilder<TModel, TUser> CreateChild(SeltzrOptions<TModel, TUser> baseOptions)
Parameters
baseOptions
SeltzrOptions<TModel, TUser>
The base options for the new instance
Returns
SeltzrOptionsBuilder<TModel, TUser>
The new SeltzrOptionsBuilder<TModel, TUser> instance
Overrides
Gets a create IOperation<TModel, TUser> for this model
public virtual IOperation<TModel, TUser> GetCreateOperation()
Returns
IOperation<TModel, TUser>
A new create operation for TModel
Gets a delete IOperation<TModel, TUser> for this model
public virtual IOperation<TModel, TUser> GetDeleteOperation()
Returns
IOperation<TModel, TUser>
A new delete operation for TModel
Gets the properties that make up the primary key of TModel
public virtual List<KeyProperty> GetPrimaryKey()
Returns
The properties that make up the primary key of TModel
Gets an update IOperation<TModel, TUser> for this model
public virtual IOperation<TModel, TUser> GetUpdateOperation(PropertyInfo[] properties, ParameterRetriever[] retrievers)
Parameters
properties
PropertyInfo[]
The properties to use to compare existing models with parsed models to determine which models to update
retrievers
ParameterRetriever[]
A list of parameter retrievers to use to get values for the properties. If null, the parsed body will be used instead
Returns
IOperation<TModel, TUser>
A new update operation for TModel