From c5b27c7eb62cc5428a0c01ffcf381f429d776122 Mon Sep 17 00:00:00 2001 From: transtrike Date: Sat, 13 Feb 2021 17:57:54 +0200 Subject: Removed all references --- src/Data/DevHive.Data/Interfaces/IRepository.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/Data/DevHive.Data/Interfaces/IRepository.cs (limited to 'src/Data/DevHive.Data/Interfaces/IRepository.cs') diff --git a/src/Data/DevHive.Data/Interfaces/IRepository.cs b/src/Data/DevHive.Data/Interfaces/IRepository.cs new file mode 100644 index 0000000..0d11cd3 --- /dev/null +++ b/src/Data/DevHive.Data/Interfaces/IRepository.cs @@ -0,0 +1,21 @@ +using System; +using System.Threading.Tasks; + +namespace DevHive.Data.Repositories.Interfaces +{ + public interface IRepository + where TEntity : class + { + //Add Entity to database + Task AddAsync(TEntity entity); + + //Find entity by id + Task GetByIdAsync(Guid id); + + //Modify Entity from database + Task EditAsync(Guid id, TEntity newEntity); + + //Delete Entity from database + Task DeleteAsync(TEntity entity); + } +} -- cgit v1.2.3 From 99e3bbad3f4d2ab5999d0de508907e5985e721a4 Mon Sep 17 00:00:00 2001 From: transtrike Date: Wed, 17 Mar 2021 17:19:36 +0200 Subject: IRepository namespace fix; Useless folder removed --- src/Data/DevHive.Data/Interfaces/ICommentRepository.cs | 1 - src/Data/DevHive.Data/Interfaces/ILanguageRepository.cs | 1 - src/Data/DevHive.Data/Interfaces/IPostRepository.cs | 1 - src/Data/DevHive.Data/Interfaces/IRatingRepository.cs | 2 -- src/Data/DevHive.Data/Interfaces/IRepository.cs | 2 +- src/Data/DevHive.Data/Interfaces/IRoleRepository.cs | 1 - src/Data/DevHive.Data/Interfaces/ITechnologyRepository.cs | 1 - src/Data/DevHive.Data/Interfaces/IUserRepository.cs | 1 - src/Data/DevHive.Data/Repositories/BaseRepository.cs | 2 +- 9 files changed, 2 insertions(+), 10 deletions(-) (limited to 'src/Data/DevHive.Data/Interfaces/IRepository.cs') diff --git a/src/Data/DevHive.Data/Interfaces/ICommentRepository.cs b/src/Data/DevHive.Data/Interfaces/ICommentRepository.cs index f85849f..7b553ec 100644 --- a/src/Data/DevHive.Data/Interfaces/ICommentRepository.cs +++ b/src/Data/DevHive.Data/Interfaces/ICommentRepository.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; using DevHive.Data.Models; -using DevHive.Data.Repositories.Interfaces; namespace DevHive.Data.Interfaces { diff --git a/src/Data/DevHive.Data/Interfaces/ILanguageRepository.cs b/src/Data/DevHive.Data/Interfaces/ILanguageRepository.cs index ea0e8c6..af512c5 100644 --- a/src/Data/DevHive.Data/Interfaces/ILanguageRepository.cs +++ b/src/Data/DevHive.Data/Interfaces/ILanguageRepository.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; using DevHive.Data.Models; -using DevHive.Data.Repositories.Interfaces; namespace DevHive.Data.Interfaces { diff --git a/src/Data/DevHive.Data/Interfaces/IPostRepository.cs b/src/Data/DevHive.Data/Interfaces/IPostRepository.cs index 5a04aed..d40a487 100644 --- a/src/Data/DevHive.Data/Interfaces/IPostRepository.cs +++ b/src/Data/DevHive.Data/Interfaces/IPostRepository.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; using DevHive.Data.Models; -using DevHive.Data.Repositories.Interfaces; namespace DevHive.Data.Interfaces { diff --git a/src/Data/DevHive.Data/Interfaces/IRatingRepository.cs b/src/Data/DevHive.Data/Interfaces/IRatingRepository.cs index db37d00..4840c59 100644 --- a/src/Data/DevHive.Data/Interfaces/IRatingRepository.cs +++ b/src/Data/DevHive.Data/Interfaces/IRatingRepository.cs @@ -2,8 +2,6 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; using DevHive.Data.Models; -using DevHive.Data.Repositories.Interfaces; - namespace DevHive.Data.Interfaces { public interface IRatingRepository : IRepository diff --git a/src/Data/DevHive.Data/Interfaces/IRepository.cs b/src/Data/DevHive.Data/Interfaces/IRepository.cs index 0d11cd3..7db8667 100644 --- a/src/Data/DevHive.Data/Interfaces/IRepository.cs +++ b/src/Data/DevHive.Data/Interfaces/IRepository.cs @@ -1,7 +1,7 @@ using System; using System.Threading.Tasks; -namespace DevHive.Data.Repositories.Interfaces +namespace DevHive.Data.Interfaces { public interface IRepository where TEntity : class diff --git a/src/Data/DevHive.Data/Interfaces/IRoleRepository.cs b/src/Data/DevHive.Data/Interfaces/IRoleRepository.cs index a1080bb..b12772c 100644 --- a/src/Data/DevHive.Data/Interfaces/IRoleRepository.cs +++ b/src/Data/DevHive.Data/Interfaces/IRoleRepository.cs @@ -1,7 +1,6 @@ using System; using System.Threading.Tasks; using DevHive.Data.Models; -using DevHive.Data.Repositories.Interfaces; namespace DevHive.Data.Interfaces { diff --git a/src/Data/DevHive.Data/Interfaces/ITechnologyRepository.cs b/src/Data/DevHive.Data/Interfaces/ITechnologyRepository.cs index f746d9d..91c82ea 100644 --- a/src/Data/DevHive.Data/Interfaces/ITechnologyRepository.cs +++ b/src/Data/DevHive.Data/Interfaces/ITechnologyRepository.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; using DevHive.Data.Models; -using DevHive.Data.Repositories.Interfaces; namespace DevHive.Data.Interfaces { diff --git a/src/Data/DevHive.Data/Interfaces/IUserRepository.cs b/src/Data/DevHive.Data/Interfaces/IUserRepository.cs index aec0eb3..494f540 100644 --- a/src/Data/DevHive.Data/Interfaces/IUserRepository.cs +++ b/src/Data/DevHive.Data/Interfaces/IUserRepository.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; using DevHive.Data.Models; -using DevHive.Data.Repositories.Interfaces; namespace DevHive.Data.Interfaces { diff --git a/src/Data/DevHive.Data/Repositories/BaseRepository.cs b/src/Data/DevHive.Data/Repositories/BaseRepository.cs index ece372e..239a3bc 100644 --- a/src/Data/DevHive.Data/Repositories/BaseRepository.cs +++ b/src/Data/DevHive.Data/Repositories/BaseRepository.cs @@ -1,6 +1,6 @@ using System; using System.Threading.Tasks; -using DevHive.Data.Repositories.Interfaces; +using DevHive.Data.Interfaces; using Microsoft.EntityFrameworkCore; namespace DevHive.Data.Repositories -- cgit v1.2.3