Example #1
0
        private Car getCar(string id)
        {
            Car c = new Car();
            c.Year = 2012;
            c.Make = "Honda";
            return c;

        }
Example #2
0
        public bool AddCar(Car c2) {

            Console.WriteLine("Car Added");
            Car newCar = new Car();
            newCar.Year = c2.Year;
            newCar.Make = c2.Make;
            list.Add(newCar);
            return true;
        
        }
Example #3
0
 public MyRestService()
 {
     list = new List<Car>();
     Car c = new Car();
     c.Make = "Honda";
     c.Year = 2010;
     list.Add(c);
     Car c2 = new Car();
     c2.Year = 2008;
     c2.Make = "BMW";
     list.Add(c2);
 }
Example #4
0
 public string UpdateCar(string id, Car c)
 {
     string text = "The car with Id  = " + id + " will be updated from the system";
     return text;
 }