Ejemplo n.º 1
0
        // GET: Bonuses/Delete/5
        public IActionResult Delete(long?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            //var bonus = await _context.Bonuses
            //    .Include(b => b.BonusType)
            //    .Include(b => b.EmployeeInfo)
            //    .FirstOrDefaultAsync(m => m.Id == id);
            var bonus = bonusRepository.GetDelete().FirstOrDefault(m => m.Id == id);

            if (bonus == null)
            {
                return(NotFound());
            }

            return(View(bonus));
        }