Template Documentation
MoviesService Class |
Implements all the IMoviesService functions with the base GenericServiceTModel, TEntity functions
Inheritance Hierarchy
SystemObject Template.Service.CoreGenericServiceMoviesModel, MOVIES
Template.Service.ClassMoviesService
Template.Service.ClassMoviesService
Namespace: Template.Service.Class
Assembly: Template.Service (in Template.Service.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class MoviesService : GenericService<MoviesModel, MOVIES>, IMoviesService, IService<MoviesModel>
The MoviesService type exposes the following members.
Constructors
Name | Description | |
---|---|---|
MoviesService |
Constructor of MoviesService, Unity inject the IUnitOfWork object for database transaction and pass the respective repository to the parent for the most common functions
|
Methods
Name | Description | |
---|---|---|
Add |
Add an entity based on the passed model and insert it on database
(Inherited from GenericServiceTModel, TEntity.) | |
AddIEnumetable |
Add an IEnumerable of entities based on the passed models IEnumerable amd insert them on database
(Inherited from GenericServiceTModel, TEntity.) | |
Delete |
Add an entity based on the passed model and delete it on database
(Inherited from GenericServiceTModel, TEntity.) | |
DeleteBy |
Deletes any match with the given predicate
(Inherited from GenericServiceTModel, TEntity.) | |
Edit |
Add an entity based on the passed model and delete it on database
(Inherited from GenericServiceTModel, TEntity.) | |
FindBy |
Retuns an IEnumerable of models based on the expresion, retreives entities from the database and convert them to models
(Inherited from GenericServiceTModel, TEntity.) | |
Get |
Get an unique model based on the expresion, retreives the entity and convert it to model
(Inherited from GenericServiceTModel, TEntity.) | |
GetAll |
Get all the elements of the database, retreives entities from the database and convert them to models
(Inherited from GenericServiceTModel, TEntity.) | |
SelectWhereTResult |
This function allows to select the specific properties and filter by where clause on database, not on memory, in that way it improves the performace
(Inherited from GenericServiceTModel, TEntity.) | |
ToEntity |
Converts a model to an entity
(Inherited from GenericServiceTModel, TEntity.) | |
ToEntityEnumerable |
Converts an IEnumerable of Models to an IEnumerable of entities
(Inherited from GenericServiceTModel, TEntity.) | |
ToEntityExpression |
Convert an expression of a model to an expression to an Entity, be careful to make an expression of with entities properties
(Inherited from GenericServiceTModel, TEntity.) | |
ToEntityFunctionTResult |
Convert a function of a model to a function of a TEntity, be careful to make an function with entities properties
(Inherited from GenericServiceTModel, TEntity.) | |
ToModel |
Converts an entity to a model
(Inherited from GenericServiceTModel, TEntity.) | |
ToModelEnumerable |
Convert
(Inherited from GenericServiceTModel, TEntity.) |
Fields
Name | Description | |
---|---|---|
_mapper |
The IMapper object is used to map objects between TEntity and TModel types
(Inherited from GenericServiceTModel, TEntity.) | |
_repository |
The GenericRepository of TEntity to do all the common database functions
(Inherited from GenericServiceTModel, TEntity.) | |
_Uof |
See Also