public ActionResult AddDesignations(DesignationViewModel designationViewModel) { Designations designations = new Designations(); if (ModelState.IsValid) { designations.DesignationName = designationViewModel.DesignationName; designationBL.AddDesignation(designations); return(RedirectToAction("DisplayDesignations")); } else { return(View()); } }
// POST api/values public int Post([FromBody] DesignationBO value) { return(_iDesignationBL.AddDesignation(value)); }