2024-05-07 23:50:14 +04:00
|
|
|
|
using MedicalDatabaseContracts.Models;
|
|
|
|
|
|
|
|
|
|
namespace MedicalDatabaseContracts
|
|
|
|
|
{
|
|
|
|
|
public interface IStorage<T> where T : AbstractModel
|
|
|
|
|
{
|
2024-05-08 02:34:54 +04:00
|
|
|
|
T? Get(int id, out long elapsedMilliseconds);
|
2024-05-07 23:50:14 +04:00
|
|
|
|
T? Get(int id);
|
2024-05-08 02:34:54 +04:00
|
|
|
|
List<T> GetAll(out long elapsedMilliseconds);
|
2024-05-07 23:50:14 +04:00
|
|
|
|
List<T> GetAll();
|
2024-05-08 02:34:54 +04:00
|
|
|
|
void Insert(T item, out long elapsedMilliseconds);
|
2024-05-07 23:50:14 +04:00
|
|
|
|
void Insert(T item);
|
2024-05-08 02:34:54 +04:00
|
|
|
|
void Update(T item, out long elapsedMilliseconds);
|
2024-05-07 23:50:14 +04:00
|
|
|
|
void Update(T item);
|
2024-05-08 02:34:54 +04:00
|
|
|
|
void Delete(int id, out long elapsedMilliseconds);
|
2024-05-07 23:50:14 +04:00
|
|
|
|
void Delete(int id);
|
|
|
|
|
}
|
|
|
|
|
}
|