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