public async Task <IActionResult> Create(SalaryFormViewModel vm) { vm.Salary.Driver = await _driverRepository.GetDriver(vm.DriverId); await _salaryRepository.AddSalary(vm.Salary); return(Redirect(Request.Headers["Referer"].ToString())); }
public async Task <bool> Post([FromBody] Salary item) // return result { await _salRepository.AddSalary(item); return(true); }