Example #1
0
        public IHttpActionResult GetSearchRequestEntry(string workflowid)
        {
            int    retCode          = 0;
            string retVal           = string.Empty;
            string connectionString = ConfigurationManager.ConnectionStrings["AppraisalDbConnectionString"].ConnectionString;
            string returnMessage    = "{{\"responseCode\":\"{0}\",\"responseMessage\":\"{1}\",\"result\":\"{2}\"}}";

            //Validate The Input Parameters
            if (workflowid.ToString().Equals(null))
            {
                return(NotFound());
                //returnMessage = await Task.FromResult(string.Format(returnMessage, "01", "Invalid workflowid", null));
                // return JsonConvert.DeserializeObject(returnMessage.ToString());
            }


            var Result = LINQCalls.getSearchRequestEntry(workflowid);

            if (Result == null)
            {
                return(NotFound());
            }
            return(Ok(Result));

            //returnMessage = await Task.FromResult(string.Format(returnMessage, retCode.ToString(), retVal, Result));
            //return JsonConvert.DeserializeObject(returnMessage.ToString());
        }