Template Documentation
IGenericRepositoryTEntity Interface |
Declares all the funtions with the most commons database actions
Namespace: Template.Core.Interface
Assembly: Template.Repository (in Template.Repository.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public interface IGenericRepository<TEntity> where TEntity : BaseEntity
Type Parameters
- TEntity
- The Entity Framework entity that represents a table
The IGenericRepositoryTEntity type exposes the following members.
Methods
Name | Description | |
---|---|---|
Add |
Add a new entity to the context, it will be added to the database on Save
| |
AddIEnumerable |
Add a IEnumerable of new entities to the context, they will be added to the database on Save
| |
Delete |
Marks the given entity as deleted, the entity will be deleted on Save
| |
DeleteBy |
Marks the entities that match with the given predicate as deleted, they will be deleted of the database on Save
| |
Edit |
Marks the passed entity as Modified, the changes will persist on Save
| |
FindBy |
Filters the results by the passed predicate
| |
Get |
Gets an unique TEntity from the database
| |
GetAll |
Get all the results of the IEntity
| |
Save |
Save all the changes made to the context
| |
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
|
See Also