MoviesCategoryService Class

Template MVC

MoviesCategoryService Class

Implements all the IMoviesCategoryService functions with the base GenericServiceTModel, TEntity functions
Inheritance Hierarchy
SystemObject  Template.Service.CoreGenericServiceMoviesCategoryModel, MOVIE_CATEGORY
    Template.Service.ClassMoviesCategoryService

Namespace:  Template.Service.Class
Assembly:  Template.Service (in Template.Service.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class MoviesCategoryService : GenericService<MoviesCategoryModel, MOVIE_CATEGORY>, 
	IMoviesCategoryService, IService<MoviesCategoryModel>

The MoviesCategoryService type exposes the following members.

Constructors
  NameDescription
Public methodMoviesCategoryService
Constructor of MoviesCategoryService, Unity inject the IUnitOfWork object for database transaction and pass the respective repository to the parent for the most common functions
Top
Methods
  NameDescription
Public methodAdd
Add an entity based on the passed model and insert it on database
(Inherited from GenericServiceTModel, TEntity.)
Public methodAddIEnumetable
Add an IEnumerable of entities based on the passed models IEnumerable amd insert them on database
(Inherited from GenericServiceTModel, TEntity.)
Public methodDelete
Add an entity based on the passed model and delete it on database
(Inherited from GenericServiceTModel, TEntity.)
Public methodDeleteBy
Deletes any match with the given predicate
(Inherited from GenericServiceTModel, TEntity.)
Public methodEdit
Add an entity based on the passed model and delete it on database
(Inherited from GenericServiceTModel, TEntity.)
Public methodFindBy
Retuns an IEnumerable of models based on the expresion, retreives entities from the database and convert them to models
(Inherited from GenericServiceTModel, TEntity.)
Public methodGet
Get an unique model based on the expresion, retreives the entity and convert it to model
(Inherited from GenericServiceTModel, TEntity.)
Public methodGetAll
Get all the elements of the database, retreives entities from the database and convert them to models
(Inherited from GenericServiceTModel, TEntity.)
Public methodSelectWhereTResult
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.)
Public methodToEntity
Converts a model to an entity
(Inherited from GenericServiceTModel, TEntity.)
Public methodToEntityEnumerable
Converts an IEnumerable of Models to an IEnumerable of entities
(Inherited from GenericServiceTModel, TEntity.)
Public methodToEntityExpression
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.)
Public methodToEntityFunctionTResult
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.)
Public methodToModel
Converts an entity to a model
(Inherited from GenericServiceTModel, TEntity.)
Public methodToModelEnumerable
Convert
(Inherited from GenericServiceTModel, TEntity.)
Top
Fields
  NameDescription
Private field_mapper
The IMapper object is used to map objects between TEntity and TModel types
(Inherited from GenericServiceTModel, TEntity.)
Private field_repository
The GenericRepository of TEntity to do all the common database functions
(Inherited from GenericServiceTModel, TEntity.)
Private field_Uof
Top
See Also