public JsonResult Insert(VendorViewModel vViewModel) { try { Set_Date_Session(vViewModel.Vendor); vViewModel.Vendor.VendorId = _vRepo.Insert(vViewModel.Vendor); vViewModel.FriendlyMessage.Add(MessageStore.Get("V01")); Logger.Debug("Vendor Controller Insert Vendor"); } catch (Exception ex) { vViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01")); Logger.Error("Vendor Controller - Insert Vendor " + ex.Message); } // return Json(JsonConvert.SerializeObject(vViewModel)); return(Json(vViewModel)); }