From 6a85255c78a448256fab68cd361983ffc85f2b03 Mon Sep 17 00:00:00 2001 From: transtrike Date: Fri, 11 Dec 2020 14:35:39 +0200 Subject: Renamed Models to Data --- Data/Models/Interfaces/Database/IRepository.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Data/Models/Interfaces/Database/IRepository.cs (limited to 'Data/Models/Interfaces') diff --git a/Data/Models/Interfaces/Database/IRepository.cs b/Data/Models/Interfaces/Database/IRepository.cs new file mode 100644 index 0000000..81a1a35 --- /dev/null +++ b/Data/Models/Interfaces/Database/IRepository.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Data.Models.Interfaces.Database +{ + public interface IRepository + where TEntity : class + { + //Add Entity to database + Task AddAsync(TEntity entity); + + //Return *count* instances of Entity from the database + IEnumerable Query(int count); + + //Find entity by id + Task FindByIdAsync(object id); + + //Modify Entity from database + Task EditAsync(object id, TEntity newEntity); + + //Delete Entity from database + Task DeleteAsync(object id); + } +} \ No newline at end of file -- cgit v1.2.3