public async Task <bool> ResourceDeallocationAsync(ResourceDeallocationRequest request)
        {
            var officer = await _officerDetailsCollection.GetAsync(request.OfficerReferenceCode);

            officer.IsOfficerAssigned = false;
            //send notification
            return(await _officerDetailsCollection.UpdateAsync(officer));
        }
        public async Task <IActionResult> ResourceDeallocation(ResourceDeallocationRequest request)
        {
            ActionResponse response;

            try
            {
                bool result = await _businessLogic.ResourceDeallocationAsync(request);

                response = (result) ? new ActionResponse(StatusCodes.Status200OK) : new ActionResponse(StatusCodes.Status422UnprocessableEntity);
            }
            catch (Exception ex)
            {
                response = new ActionResponse(StatusCodes.Status500InternalServerError);
                response.StatusDescription += ex.Message.ToString();
            }

            return(StatusCode(response.StatusCode, response));
        }