Ejemplo n.º 1
0
        //SECTION SHOE ORDERS
        public Order AddShoe(int id, Shoe shoe)
        {
            Order order = _repo.Get(id);

            if (order == null)
            {
                throw new Exception("Invalid Id Homie");
            }
            Shoe shoeToAdd = _shoeRepo.Get(shoe.Id);

            if (shoeToAdd == null)
            {
                throw new Exception("Invalid Id Homie");
            }
            _repo.AddShoe(id, shoe.Id);
        }
Ejemplo n.º 2
0
        //SECTION SHOE ORDERS
        public string AddShoe(int id, string shoeId)
        {
            Order order = _repo.Get(id);

            if (order == null)
            {
                throw new Exception("Invalid Order Id Homie");
            }
            Shoe shoeToAdd = _shoeRepo.Get(shoeId);

            if (shoeToAdd == null)
            {
                throw new Exception("Invalid Shoe Id Homie");
            }
            _repo.AddShoe(id, shoeId);
            return("Successfully added Shoe to Order");
        }
Ejemplo n.º 3
0
 internal IEnumerable <Shoe> Get()
 {
     return(_repo.Get());
 }
Ejemplo n.º 4
0
 public IEnumerable <Shoe> Get()
 {
     return(_repo.Get());
 }