Beispiel #1
0
 public Order GetOrder(int orderID)
 {
     using (NorthWindModel context = new NorthWindModel())
     {
         return(context.Orders.Where(o => o.OrderID == orderID).FirstOrDefault());
     }
 }
Beispiel #2
0
 public List <Order> GetOrders()
 {
     using (NorthWindModel context = new NorthWindModel())
     {
         return(context.Orders.ToList());
     }
 }
Beispiel #3
0
 public List <Customer> GetCustomers()
 {
     using (NorthWindModel context = new NorthWindModel())
     {
         return(context.Customers.ToList());
     }
 }
Beispiel #4
0
 public List <Category> GetCategories()
 {
     using (NorthWindModel context = new NorthWindModel())
     {
         return(context.Categories.ToList());
     }
 }
Beispiel #5
0
 public Employee GetEmployee(int id)
 {
     using (NorthWindModel context = new NorthWindModel())
     {
         return(context.Employees.Where(emp => emp.EmployeeID == id).FirstOrDefault());
     }
 }
Beispiel #6
0
 public List <Employee> GetEmployees()
 {
     using (NorthWindModel context = new NorthWindModel())
     {
         return(context.Employees.ToList());
     }
 }