From 0f35d898c2d0bbc84196ad254dd94a26852e3e4e Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 15 Dec 2020 20:13:24 +0200 Subject: Implemented RoleService and updated RoleRepository structure --- src/DevHive.Data/Repositories/RoleRepository.cs | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'src/DevHive.Data') diff --git a/src/DevHive.Data/Repositories/RoleRepository.cs b/src/DevHive.Data/Repositories/RoleRepository.cs index 1c40b04..b83a2e6 100644 --- a/src/DevHive.Data/Repositories/RoleRepository.cs +++ b/src/DevHive.Data/Repositories/RoleRepository.cs @@ -2,32 +2,47 @@ using System; using System.Threading.Tasks; using Data.Models.Interfaces.Database; using DevHive.Data.Models; +using Microsoft.EntityFrameworkCore; namespace DevHive.Data.Repositories { public class RoleRepository : IRepository { + private readonly DbContext _context; + + public RoleRepository(DbContext context) + { + this._context = context; + } + public async Task AddAsync(Role entity) { throw new NotImplementedException(); } - //Find entity by id public async Task GetByIdAsync(Guid id) { throw new NotImplementedException(); } - //Modify Entity from database public async Task EditAsync(Role newEntity) { throw new NotImplementedException(); } - //Delete Entity from database public async Task DeleteAsync(Role entity) { throw new NotImplementedException(); } + + public async Task DoesNameExist(string name) + { + throw new NotImplementedException(); + } + + public async Task DoesRoleExist(Guid id) + { + throw new NotImplementedException(); + } } } -- cgit v1.2.3