public async Task <AsycudaDocumentSetEx> CreateAsycudaDocumentSetEx(AsycudaDocumentSetEx entity) { try { using (var t = new AsycudaDocumentSetExClient()) { return(new AsycudaDocumentSetEx(await t.CreateAsycudaDocumentSetEx(entity.DTO).ConfigureAwait(continueOnCapturedContext: false))); } } catch (FaultException <ValidationFault> e) { throw new Exception(e.Detail.Message, e.InnerException); } catch (Exception) { Debugger.Break(); throw; } }
public async Task SaveAsycudaDocumentSetEx(AsycudaDocumentSetEx asycudaDocumentSetEx) { try { using (var t = new DocumentSetClient()) { await t.SaveAsycudaDocumentSetEx(asycudaDocumentSetEx.DTO).ConfigureAwait(false); } } catch (FaultException <ValidationFault> e) { throw new Exception(e.Detail.Message, e.InnerException); } catch (Exception ex) { Debugger.Break(); throw; } }
public async Task <AsycudaDocumentSetEx> UpdateAsycudaDocumentSetEx(AsycudaDocumentSetEx entity) { if (entity == null) { return(entity); } var entitychanges = entity.ChangeTracker.GetChanges().FirstOrDefault(); if (entitychanges != null) { try { using (var t = new AsycudaDocumentSetExClient()) { var updatedEntity = await t.UpdateAsycudaDocumentSetEx(entitychanges).ConfigureAwait(false); entity.EntityId = updatedEntity.EntityId; entity.DTO.AcceptChanges(); //var = entity.; //entity.ChangeTracker.MergeChanges(,updatedEntity); //entity. = ; return(entity); } } catch (FaultException <ValidationFault> e) { throw new Exception(e.Detail.Message, e.InnerException); } catch (Exception) { Debugger.Break(); throw; } } else { return(entity); } }