-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refactored repos to use caching
- Loading branch information
Showing
5 changed files
with
17 additions
and
7 deletions.
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
4
Microservices/ClientsMicroservice/Data/Repository/ClientsDbRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
using ClientsMicroservice.Data.Context; | ||
using RealEstate.Shared.Data.Cache; | ||
|
||
namespace RealEstate.Shared.Data.Repository | ||
{ | ||
public class ClientsDbRepository : Repository, IClientsDbRepository | ||
{ | ||
public ClientsDbRepository(ClientsDBContext context) | ||
public ClientsDbRepository(ClientsDBContext context, ICacheService cacheService) | ||
{ | ||
Context = context; | ||
_cacheService = cacheService; | ||
} | ||
} | ||
} |
4 changes: 3 additions & 1 deletion
4
Microservices/ContractsMicroservice/Data/Repository/ContractsDbRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
using ContractsMicroservice.Data.Context; | ||
using RealEstate.Shared.Data.Cache; | ||
|
||
namespace RealEstate.Shared.Data.Repository | ||
{ | ||
public class ContractsDbRepository : Repository, IContractsDbRepository | ||
{ | ||
public ContractsDbRepository(ContractsDBContext context) | ||
public ContractsDbRepository(ContractsDBContext context, ICacheService cacheService) | ||
{ | ||
Context = context; | ||
_cacheService = cacheService; | ||
} | ||
} | ||
} |
6 changes: 4 additions & 2 deletions
6
Microservices/EstatesMicroservice/Data/Repository/EstatesDbRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
using RealEstate.Shared.Data.Context; | ||
using RealEstate.Shared.Data.Cache; | ||
using RealEstate.Shared.Data.Context; | ||
|
||
namespace RealEstate.Shared.Data.Repository | ||
{ | ||
public class EstatesDbRepository : Repository, IEstatesDbRepository | ||
{ | ||
public EstatesDbRepository(EstatesDBContext context) | ||
public EstatesDbRepository(EstatesDBContext context, ICacheService cacheService) | ||
{ | ||
Context = context; | ||
_cacheService = cacheService; | ||
} | ||
} | ||
} |
6 changes: 4 additions & 2 deletions
6
Microservices/ListingsMicroservice/Data/Repository/ListingsDbRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
using ListingsMicroservice.Data.Context; | ||
using ListingsMicroservice.Data.Repository; | ||
using RealEstate.Shared.Data.Cache; | ||
|
||
namespace RealEstate.Shared.Data.Repository | ||
{ | ||
public class ListingsDbRepository : Repository, IListingsDbRepository | ||
{ | ||
public ListingsDbRepository(ListingsDBContext context) | ||
public ListingsDbRepository(ListingsDBContext context, ICacheService cacheService) | ||
{ | ||
Context = context; | ||
Context = context; | ||
_cacheService = cacheService; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
using Microsoft.EntityFrameworkCore; | ||
using RealEstate.Shared.Data.Cache; | ||
|
||
namespace RealEstate.Shared.Data.Repository | ||
{ | ||
public class ApplicationDbRepository : Repository, IApplicationDbRepository | ||
{ | ||
public ApplicationDbRepository(DbContext context) | ||
public ApplicationDbRepository(DbContext context, ICacheService cacheService) | ||
{ | ||
Context = context; | ||
_cacheService = cacheService; | ||
} | ||
} | ||
} |