diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2020-12-15 19:36:17 +0200 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2020-12-15 19:36:17 +0200 |
| commit | bab6254b9b8649920dc85cfef48be9a530f4d1f7 (patch) | |
| tree | 5f8edc6e7c634e7400a483eeaa1b34f6bd33cf1a /src/DevHive.Data | |
| parent | 15b69b3036ba6a36ed0de8a64f466c9f46d7f0e9 (diff) | |
| download | DevHive-bab6254b9b8649920dc85cfef48be9a530f4d1f7.tar DevHive-bab6254b9b8649920dc85cfef48be9a530f4d1f7.tar.gz DevHive-bab6254b9b8649920dc85cfef48be9a530f4d1f7.zip | |
Implemented data Role model, added a RoleRepository skeleton and added mappings
Diffstat (limited to 'src/DevHive.Data')
| -rw-r--r-- | src/DevHive.Data/Models/Role.cs | 10 | ||||
| -rw-r--r-- | src/DevHive.Data/Repositories/RoleRepository.cs | 33 |
2 files changed, 43 insertions, 0 deletions
diff --git a/src/DevHive.Data/Models/Role.cs b/src/DevHive.Data/Models/Role.cs new file mode 100644 index 0000000..974add1 --- /dev/null +++ b/src/DevHive.Data/Models/Role.cs @@ -0,0 +1,10 @@ +using System; +using Microsoft.AspNetCore.Identity; +using System.ComponentModel.DataAnnotations.Schema; + +namespace DevHive.Data.Models +{ + [Table("Roles")] + public class Role : IdentityRole<Guid> + { } +} diff --git a/src/DevHive.Data/Repositories/RoleRepository.cs b/src/DevHive.Data/Repositories/RoleRepository.cs new file mode 100644 index 0000000..5ddadab --- /dev/null +++ b/src/DevHive.Data/Repositories/RoleRepository.cs @@ -0,0 +1,33 @@ +using System; +using System.Threading.Tasks; +using Data.Models.Interfaces.Database; +using DevHive.Data.Models; + +namespace DevHive.Data.Repositories +{ + public class RoleRepository : IRepository<Role> + { + public async Task AddAsync(Role entity) + { + throw new NotImplementedException(); + } + + //Find entity by id + public async Task<TEntity> 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(); + } + } +} |
