コード例 #1
0
        public OperationResult Post(NewCar newCar)
        {
            var car = new Car { Manufacturer = newCar.Manufacturer, Model = newCar.Model };

            _garage.Park(car);

            return new OperationResult.SeeOther { RedirectLocation = car.CreateUri() };
        }
コード例 #2
0
 public void Park(Car car)
 {
     _cars.Add(car);
 }