From 0f387222ba7424240bdaddfd16a4c9304ec0ac28 Mon Sep 17 00:00:00 2001 From: Carlos Carrero Date: Tue, 24 Oct 2017 19:07:12 -0500 Subject: [PATCH] Removing sync implementations --- ...ateGenericRepositoryReliableStateManager.cs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Yuxi.SharedKernel.Storage/Implementations/AggregateGenericRepositoryReliableStateManager.cs b/Yuxi.SharedKernel.Storage/Implementations/AggregateGenericRepositoryReliableStateManager.cs index b585106..4023f35 100644 --- a/Yuxi.SharedKernel.Storage/Implementations/AggregateGenericRepositoryReliableStateManager.cs +++ b/Yuxi.SharedKernel.Storage/Implementations/AggregateGenericRepositoryReliableStateManager.cs @@ -50,26 +50,31 @@ public async Task Find(string id) public T Find(params object[] keyValues) { + // Should not implement synchronous methods when using service fabric programming model throw new NotImplementedException(); } public void UpsertGraph(T entity) { + // Should not implement synchronous methods when using service fabric programming model throw new NotImplementedException(); } public IQueryFluent Query(ExpressionSpecification specification) { + // Should not implement synchronous methods when using service fabric programming model throw new NotImplementedException(); } public IQueryFluent Query() { + // Should not implement synchronous methods when using service fabric programming model throw new NotImplementedException(); } public IQueryable Queryable() { + // Should not implement synchronous methods when using service fabric programming model throw new NotImplementedException(); } @@ -99,9 +104,8 @@ public async Task Update(string id, T entity) public void Update(T entity) { - var id = entity.Id; - - Task.Run(() => Update(id, entity)); + // Should not implement synchronous methods when using service fabric programming model + throw new NotImplementedException(); } #endregion @@ -119,7 +123,8 @@ public async Task Add(T entity) void IRepository.Add(T entity) { - Task.Run(() => Add(entity)); + // Should not implement synchronous methods when using service fabric programming model + throw new NotImplementedException(); } #endregion @@ -128,6 +133,7 @@ void IRepository.Add(T entity) public IRepository GetRepository() where T1 : class, ITrackable { + // Should not implement synchronous methods when using service fabric programming model throw new NotImplementedException(); } @@ -143,11 +149,13 @@ public Task Delete(T entity) void IRepository.Delete(T entity) { - Task.Run(() => Delete(entity)); + // Should not implement synchronous methods when using service fabric programming model + throw new NotImplementedException(); } public void Delete(params object[] keyValues) { + // Should not implement synchronous methods when using service fabric programming model throw new NotImplementedException(); }