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()));
        }
Exemplo n.º 2
0
        public async Task <bool> Post([FromBody] Salary item) // return result
        {
            await _salRepository.AddSalary(item);

            return(true);
        }