コード例 #1
0
 public Employees GetEmployee(string code)
 {
     using (EmployeeDbContextContext employeeDbContextContext = new EmployeeDbContextContext())
     {
         return(employeeDbContextContext.Employees.FirstOrDefault(emp => emp.Code == code));
     }
 }
コード例 #2
0
 public IEnumerable <Employees> GetEmployee()
 {
     using (EmployeeDbContextContext employeeDbContextContext = new EmployeeDbContextContext())
     {
         return(employeeDbContextContext.Employees.ToList());
     }
 }