diff options
| author | transtrike <transtrike@gmail.com> | 2021-01-19 20:36:39 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-01-19 20:36:39 +0200 |
| commit | 33b5f6297c2c975bec8a74a8facc208261c03c9e (patch) | |
| tree | 20593ba74065681cd86ce852a65f3efc1dc0036b /src/DevHive.Data/Repositories/BaseRepository.cs | |
| parent | c96a880768d8dee9449aa4f69e14bddc8e0d92f9 (diff) | |
| download | DevHive-33b5f6297c2c975bec8a74a8facc208261c03c9e.tar DevHive-33b5f6297c2c975bec8a74a8facc208261c03c9e.tar.gz DevHive-33b5f6297c2c975bec8a74a8facc208261c03c9e.zip | |
Replaced RepoMethods with BaseClass and inherited it where needed
Diffstat (limited to 'src/DevHive.Data/Repositories/BaseRepository.cs')
| -rw-r--r-- | src/DevHive.Data/Repositories/BaseRepository.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/DevHive.Data/Repositories/BaseRepository.cs b/src/DevHive.Data/Repositories/BaseRepository.cs new file mode 100644 index 0000000..b0f0f3e --- /dev/null +++ b/src/DevHive.Data/Repositories/BaseRepository.cs @@ -0,0 +1,15 @@ +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; + +namespace DevHive.Data.Repositories +{ + public class BaseRepository + { + public async Task<bool> SaveChangesAsync(DbContext context) + { + int result = await context.SaveChangesAsync(); + + return result >= 1; + } + } +} |
