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