示例#1
0
        //special operations
        public static SELLERS SellerAllData(int id)
        {
            SELLERS seller = null;

            try
            {
                seller           = SELLERSDAL.Get(id);
                seller.ADDRESS   = SELLERSADDRESSDAL.GetAll(id);
                seller.PURCHASES = PURCHASESDDAL.GetPurchase(id);
            }
            catch (NullReferenceException nex)
            {
                seller.ADDRESS   = new List <SELLERSADDRESS>();
                seller.PURCHASES = new List <PURCHASES>();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(seller);
        }
 //2  getAll customers
 public static List <SELLERSADDRESS> GetALLAddress() => SELLERSADDRESSDAL.GetAll();
        //crudoperations

        //1 get customer details using id
        public static List <SELLERSADDRESS> GetAddresses(int sellerID) => SELLERSADDRESSDAL.GetAll(sellerID);