public void Post([FromBody] Income values) { Income income = new Income( values.Description, values.Amount, values.StaffId ); _incomeService.CreateIncome(income); }
public ActionResult Create(IncomeEditModel incomeEditModel) { if (ModelState.IsValid) { var accountId = GetCurrentAccount(); incomeEditModel.AccountId = accountId; _incomeService.CreateIncome(incomeEditModel); return(RedirectToAction("Index")); } return(View(incomeEditModel)); }
public void CreateIncome([FromBody] IncomeDto item) { _incomeService.CreateIncome(item); }
public async Task <IActionResult> CreateIncome(IncomeRequestModel model) { var income = await _incomeService.CreateIncome(model); return(Ok(income)); }
public IActionResult CreateNewIncome(IncomeViewModel income) { _incomeService.CreateIncome(income); return(RedirectToAction("Index", "Budget")); }
public void Post([FromBody] IncomeDetails createdObj) { _IncomeService.CreateIncome(createdObj); }