public async Task <IActionResult> AddSalaryInfo(Salary salary) { bool success = await _repo2.AddSalaryInfo(salary); if (success == true) { return(RedirectToAction(nameof(AddSalaryInfo), new { msg = success })); } var data = await _repo2.GetSalaryInfo(); ViewData["salary"] = data; ViewBag.titles = new SelectList(await _repo2.GetTitles(), "JobId", "JobName"); return(View()); }