//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); }
//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"); }
internal IEnumerable <Shoe> Get() { return(_repo.Get()); }
public IEnumerable <Shoe> Get() { return(_repo.Get()); }