IService(TModel) Interface

Template MVC

IServiceTModel Interface

Defines all the Generic Service functions

Namespace:  Template.Service.Core.Interface
Assembly:  Template.Service (in Template.Service.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public interface IService<TModel>
where TModel : BaseModel

Type Parameters

TModel
The Model class that represents the services

The IServiceTModel type exposes the following members.

Methods
  NameDescription
Public methodAdd
Add an entity based on the passed model and insert it on database
Public methodAddIEnumetable
Add an IEnumerable of entities based on the passed models IEnumerable amd insert them on database
Public methodDelete
Add an entity based on the passed model and delete it on database
Public methodDeleteBy
Deletes any match with the given predicate
Public methodEdit
Add an entity based on the passed model and delete it on database
Public methodFindBy
Retuns an IEnumerable of models based on the expresion, retreives entities from the database and convert them to models
Public methodGet
Get an unique model based on the expresion, retreives the entity and convert it to model
Public methodGetAll
Get all the elements of the database, retreives entities from the database and convert them to models
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
Top
See Also