//special operations public static CUSTOMERS CustomerAllData(int id) { CUSTOMERS customer = null; try { customer = CUSTOMERSDAL.Get(id); customer.ADDRESS = CUSTOMERADDRESSDAL.GetAddress(id); customer.ORDERS = ORDERSDAL.GetOrders(id); } catch (NullReferenceException nex) { customer.ADDRESS = new List <CUSTOMERADDRESS>(); customer.ORDERS = new List <ORDERS>(); } catch (Exception ex) { throw ex; } return(customer); }
//2 get customer details using email public static CUSTOMERS GetCustomer(string customerEmail) => CUSTOMERSDAL.Get(customerEmail);
//crudoperations //1 get customer details using name public static CUSTOMERS GetCustomer(int customerId) => CUSTOMERSDAL.Get(customerId);