public FhirResponse ConditionalDelete(IKey key, SearchParams _params) { ISearchService searchStore = this.FindExtension <ISearchService>(); ITransactionService transactionService = this.FindExtension <ITransactionService>(); if (searchStore == null || transactionService == null) { throw new NotSupportedException("Operation not supported"); } return(transactionService.HandleTransaction(ResourceManipulationOperationFactory.CreateDelete(key, searchStore, _params), this) ?? Respond.WithCode(HttpStatusCode.NotFound)); }
public FhirResponse ConditionalUpdate(IKey key, Resource resource, SearchParams _params) { //if update receives a key with no version how do we handle concurrency? ISearchService searchStore = this.FindExtension <ISearchService>(); ITransactionService transactionService = this.FindExtension <ITransactionService>(); if (searchStore == null || transactionService == null) { throw new NotSupportedException("Operation not supported"); } return(transactionService.HandleTransaction( ResourceManipulationOperationFactory.CreatePut(resource, key, searchStore, _params), this)); }
public FhirResponse ConditionalCreate(IKey key, Resource resource, SearchParams parameters) { ISearchService searchStore = this.FindExtension <ISearchService>(); ITransactionService transactionService = this.FindExtension <ITransactionService>(); if (searchStore == null || transactionService == null) { throw new NotSupportedException("Operation not supported"); } return(transactionService.HandleTransaction( ResourceManipulationOperationFactory.CreatePost(resource, key, searchStore, parameters), this)); }