public async Task <ResultModel> Update(int userId, RemainingBalanceModel model)
        {
            var result           = new ResultModel();
            var remainingBalance = await _remainingBalanceRepository.GetByMonthYear(userId, new DateTime(model.Year, model.Month, 1));

            if (remainingBalance == null)
            {
                result.AddNotification(ValidatorMessages.NotFound("Saldo Remanecente"));
                return(result);
            }
            remainingBalance.Value = model.Value;
            await _remainingBalanceRepository.Update(remainingBalance);

            return(result);
        }
 public async Task <IActionResult> Recalculate([FromBody] RemainingBalanceModel model) => HandleResult(await _remainingBalanceService.Recalculate(UserId, new DateTime(model.Year, model.Month, 1), true));
 public async Task <IActionResult> Update([FromBody] RemainingBalanceModel model) => HandleResult(await _remainingBalanceService.Update(UserId, model));