public Employees GetEmployee(string code) { using (EmployeeDbContextContext employeeDbContextContext = new EmployeeDbContextContext()) { return(employeeDbContextContext.Employees.FirstOrDefault(emp => emp.Code == code)); } }
public IEnumerable <Employees> GetEmployee() { using (EmployeeDbContextContext employeeDbContextContext = new EmployeeDbContextContext()) { return(employeeDbContextContext.Employees.ToList()); } }