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

            //var overTime = await _context.OverTimes
            //    .Include(o => o.FromEmployeeInfo)
            //    .Include(o => o.ToEmployeeInfo)
            //    .FirstOrDefaultAsync(m => m.Id == id);
            var overTime = overTimeRepository.GetDelete().FirstOrDefault(m => m.Id == id);

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

            return(View(overTime));
        }