//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); }
//6 delete customer public static bool DeleteCustomer(int CustomerId) => CUSTOMERSDAL.DeleteCustomer(CustomerId);
// 5 update customer public static bool UpdateCustomer(CUSTOMERS customer) => CUSTOMERSDAL.UpdateCustomer(customer);
//4 insert customer public static bool InsertCustomer(CUSTOMERS customer) => CUSTOMERSDAL.InsertCustomer(customer);
//3 getAll customers public static List <CUSTOMERS> GetCustomers() => CUSTOMERSDAL.GetAll();
//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);