public async Task <IHttpActionResult> GetSerialNumber() { HttpResponseMessage response = new HttpResponseMessage(); try { var srno = await Task.Run(() => _schemeService.GetShemeSRNo(BPID)); return(Ok(srno)); } catch (Exception ex) { response = Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); return(ResponseMessage(response)); } finally { } }