コード例 #1
0
        //// GET: EmployeeInfoes/Delete/5
        public IActionResult Delete(long?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            //var employeeInfo = await _context.EmployeeInfos
            //    .Include(e => e.Branch)
            //    .Include(e => e.Department)
            //    .Include(e => e.Designation)
            //    .FirstOrDefaultAsync(m => m.Id == id);
            var employeeInfo = employeeInfoRepository.GetDelete().FirstOrDefault(m => m.Id == id);

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

            return(View(employeeInfo));
        }