public IActionResult Post() { var uploadService = new UploadService(); List <Transaction> transactions = uploadService.GetTransactions(Request.Form.Files); _context.Add(transactions.ElementAt(transactions.Count - 1)); _context.Add(transactions.ElementAt(transactions.Count - 2)); _context.Add(transactions.ElementAt(transactions.Count - 3)); _context.Add(transactions.ElementAt(transactions.Count - 4)); _context.Add(transactions.ElementAt(transactions.Count - 5)); _context.SaveChanges(); return(Ok(transactions)); }