public async Task <IActionResult> AddDemo([FromBody] DemoModel model) { Dictionary <String, Object> dctData = new Dictionary <string, object>(); HttpStatusCode statusCode = HttpStatusCode.OK; TranStatus transaction = new TranStatus(); try { transaction = await idemo.AddDemo(model); } catch (Exception ex) { transaction = CommonHelper.TransactionErrorHandler(ex); statusCode = HttpStatusCode.BadRequest; } dctData.Add("Status", transaction); return(this.StatusCode(Convert.ToInt32(statusCode), dctData)); }