Fix gets services for mongo and sql samples
This commit is contained in:
		| @@ -43,7 +43,7 @@ namespace Core.Blueprint.DAL.Mongo.Service | |||||||
|  |  | ||||||
|             var sample = await this.repository.FindByIdAsync(_id); |             var sample = await this.repository.FindByIdAsync(_id); | ||||||
|  |  | ||||||
|             await cacheProvider.SetAsync(cacheKey, sample); |             await cacheProvider.SetAsync(cacheKey, sample, TimeSpan.FromMinutes(cacheSettings.DefaultCacheDurationInMinutes)); | ||||||
|  |  | ||||||
|             return sample; |             return sample; | ||||||
|         } |         } | ||||||
| @@ -58,7 +58,7 @@ namespace Core.Blueprint.DAL.Mongo.Service | |||||||
|  |  | ||||||
|             var samples = await this.repository.AsQueryable(); |             var samples = await this.repository.AsQueryable(); | ||||||
|  |  | ||||||
|             await cacheProvider.SetAsync(cacheKey, samples); |             await cacheProvider.SetAsync(cacheKey, samples, TimeSpan.FromMinutes(cacheSettings.DefaultCacheDurationInMinutes)); | ||||||
|  |  | ||||||
|             return samples; |             return samples; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -30,7 +30,7 @@ public class SqlSampleService : ISqlSampleService | |||||||
|  |  | ||||||
|         var samples = await _sqlSampleRepository.GetAllAsync(); |         var samples = await _sqlSampleRepository.GetAllAsync(); | ||||||
|  |  | ||||||
|         await cacheProvider.SetAsync(cacheKey, samples); |         await cacheProvider.SetAsync(cacheKey, samples, TimeSpan.FromMinutes(cacheSettings.DefaultCacheDurationInMinutes)); | ||||||
|  |  | ||||||
|         return samples; |         return samples; | ||||||
|     } |     } | ||||||
| @@ -44,7 +44,7 @@ public class SqlSampleService : ISqlSampleService | |||||||
|  |  | ||||||
|         var sample = await _sqlSampleRepository.GetByIdAsync(id); |         var sample = await _sqlSampleRepository.GetByIdAsync(id); | ||||||
|  |  | ||||||
|         await cacheProvider.SetAsync(cacheKey, sample); |         await cacheProvider.SetAsync(cacheKey, sample, TimeSpan.FromMinutes(cacheSettings.DefaultCacheDurationInMinutes)); | ||||||
|  |  | ||||||
|         return sample; |         return sample; | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user