mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-30 11:38:32 -07:00
43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace RequestPlex.Store
|
|
{
|
|
public interface IRepository<T>
|
|
{
|
|
/// <summary>
|
|
/// Inserts the specified entity.
|
|
/// </summary>
|
|
/// <param name="entity">The entity.</param>
|
|
long Insert(T entity);
|
|
|
|
/// <summary>
|
|
/// Gets all.
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
IEnumerable<T> GetAll();
|
|
|
|
/// <summary>
|
|
/// Gets the specified identifier.
|
|
/// </summary>
|
|
/// <param name="id">The identifier.</param>
|
|
/// <returns></returns>
|
|
T Get(string id);
|
|
T Get(int id);
|
|
/// <summary>
|
|
/// Deletes the specified entity.
|
|
/// </summary>
|
|
/// <param name="entity">The entity.</param>
|
|
void Delete(T entity);
|
|
|
|
/// <summary>
|
|
/// Updates the specified entity.
|
|
/// </summary>
|
|
/// <param name="entity">The entity.</param>
|
|
/// <returns></returns>
|
|
bool Update(T entity);
|
|
}
|
|
}
|