aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Data/Repositories
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-01-12 20:36:22 +0200
committertranstrike <transtrike@gmail.com>2021-01-12 20:36:22 +0200
commitd2a754aa220f37ac28393451e7ad5793687bb999 (patch)
tree7538cf9a752fb236229eeb04182558722cb8caed /src/DevHive.Data/Repositories
parentb74b5925df33b13918aa9212d65b0e6f031f97b4 (diff)
downloadDevHive-d2a754aa220f37ac28393451e7ad5793687bb999.tar
DevHive-d2a754aa220f37ac28393451e7ad5793687bb999.tar.gz
DevHive-d2a754aa220f37ac28393451e7ad5793687bb999.zip
Added launch & task settings for vscode
Diffstat (limited to 'src/DevHive.Data/Repositories')
-rw-r--r--src/DevHive.Data/Repositories/TechnologyRepository.cs19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/DevHive.Data/Repositories/TechnologyRepository.cs b/src/DevHive.Data/Repositories/TechnologyRepository.cs
index 2ed3a23..cc0e642 100644
--- a/src/DevHive.Data/Repositories/TechnologyRepository.cs
+++ b/src/DevHive.Data/Repositories/TechnologyRepository.cs
@@ -9,14 +9,16 @@ namespace DevHive.Data.Repositories
{
public abstract class TechnologyRepository : IRepository<Technology>
{
- private DevHiveContext _context;
+ private readonly DevHiveContext _context;
public TechnologyRepository(DevHiveContext context)
{
this._context = context;
}
- //Create
+ #region Create
+
+
public async Task<bool> AddAsync(Technology entity)
{
await this._context
@@ -25,8 +27,10 @@ namespace DevHive.Data.Repositories
return await RepositoryMethods.SaveChangesAsync(this._context);
}
+ #endregion
+
+ #region Read
- //Read
public async Task<Technology> GetByIdAsync(Guid id)
{
return await this._context
@@ -49,8 +53,10 @@ namespace DevHive.Data.Repositories
.AsNoTracking()
.AnyAsync(r => r.Id == id);
}
+ #endregion
+
+ #region Edit
- //Edit
public async Task<bool> EditAsync(Technology newEntity)
{
this._context
@@ -59,8 +65,10 @@ namespace DevHive.Data.Repositories
return await RepositoryMethods.SaveChangesAsync(this._context);
}
+ #endregion
+
+ #region Delete
- //Delete
public async Task<bool> DeleteAsync(Technology entity)
{
this._context
@@ -69,5 +77,6 @@ namespace DevHive.Data.Repositories
return await RepositoryMethods.SaveChangesAsync(this._context);
}
+ #endregion
}
} \ No newline at end of file