Exemplo n.º 1
0
        public HttpResponseMessage GetIdentificationById(HttpRequestMessage reqObject)
        {
            string IdentificationId = string.Empty;

            _requestedDataObject = _IDataManipulation.GetRequestedDataObject(reqObject);
            if (_requestedDataObject != null && _requestedDataObject.BusinessData != null)
            {
                _IdentificationType = JsonConvert.DeserializeObject <IdentificationType>(_requestedDataObject.BusinessData);
                IdentificationId    = _IdentificationType.IdentificationId;
            }

            if (!string.IsNullOrWhiteSpace(IdentificationId))
            {
                _IdentificationType = new IdentificationType();
                _IdentificationType = _IIdentificationTypeService.GetIdentificationTypeById(IdentificationId);
            }
            if (_IdentificationType != null)
            {
                _serviceResponse = _IDataManipulation.ResopnseWhenDataFound(_IdentificationType, "information has been fetched successfully");
            }
            else
            {
                _serviceResponse = _IDataManipulation.ResopnseWhenDataNotFound("Identification Not Found...");
            }
            _response = _IDataManipulation.CreateResponse(_serviceResponse, reqObject);
            return(_response);
        }