コード例 #1
0
        public async Task <IActionResult> DeleteConfirmed(long id)
        {
            //var leaveType = await _context.LeaveTypes.FindAsync(id);
            //_context.LeaveTypes.Remove(leaveType);
            //await _context.SaveChangesAsync();
            var leaveType = leaveTypeRepository.GetDelete(id);
            await leaveTypeRepository.Delete(leaveType);

            return(RedirectToAction(nameof(Index)));
        }