public async Task <IActionResult> Post(SpendingOperation _spendingOperation) { if (!ModelState.IsValid) { return(BadRequest("Invalid data.")); } _context.Add(_spendingOperation); await _context.SaveChangesAsync(); return(Ok(_spendingOperation)); }