コード例 #1
0
        public async Task <ActionResult <List <Expense> > > Delete([FromBody] List <Expense> expenses)
        {
            try
            {
                _context.RemoveRange(expenses);
                await _context.SaveChangesAsync();
            } catch (Exception error)
            {
                return(BadRequest(error.Message));
            }

            return(Ok("Expenses got deleted!"));
        }