Esempio n. 1
0
        /// <summary>
        ///     Deletes the missionRequest.
        /// </summary>
        /// <param name="id">
        ///     The identifier.
        /// </param>
        /// <returns>
        ///     Task{OperationResult}.
        /// </returns>
        public async Task <OperationResult> DeleteMissionRequest(string id)
        {
            var entities = await _azureManager.GetEntitiesForCompleteDelete <MissionRequestAzure>(id);

            if (entities.AnyValues())
            {
                var deletingRequest = entities[0];
                var result          = await _azureManager.DeleteEntityAsync(deletingRequest);

                await _imagesProvider.DeleteImages(deletingRequest.ProofImageUrls.SplitStringByDelimiter());

                return(result);
            }

            return(new OperationResult(OperationResultStatus.Warning, "No entities to delete"));
        }