Interface IRepositoryBase<TId, TModel>
Simplic repository data base
Namespace: Simplic.Data
Assembly: Simplic.Data.dll
Syntax
public interface IRepositoryBase<TId, TModel>
Type Parameters
| Name | Description |
|---|---|
| TId | Entity key type |
| TModel | Entity type |
Methods
| Improve this Doc View SourceDelete(TId)
Delete data by id
Declaration
bool Delete(TId id)
Parameters
| Type | Name | Description |
|---|---|---|
| TId | id | Id of an object to delete |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if successful |
Delete(TModel)
Delete data
Declaration
bool Delete(TModel obj)
Parameters
| Type | Name | Description |
|---|---|---|
| TModel | obj | Object to delete |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if successful |
Get(TId)
Get data by id
Declaration
TModel Get(TId id)
Parameters
| Type | Name | Description |
|---|---|---|
| TId | id | Id |
Returns
| Type | Description |
|---|---|
| TModel | Instance of |
GetAll()
Get all objects
Declaration
IEnumerable<TModel> GetAll()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<TModel> | Enumerable of |
Save(TModel)
Create or update data
Declaration
bool Save(TModel obj)
Parameters
| Type | Name | Description |
|---|---|---|
| TModel | obj | Object to save |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if successful |