public Person Update(Person person) { //set property person.LastName = "Van Halen"; //send back return person; }
public Person Create(Person person) { //set id person.Id = "5678"; //send it back with new id return person; }
public Person Get(string id) { //create person Person person = new Person(); //set properties person.Id = "5150"; person.LastName = "Van Halen"; //send back return person; }
public List<Person> List() { //create list List<Person> list = new List<Person>(); //create one item Person personOne = new Person { Id = "123", LastName = "Koster" }; Person personTwo = new Person { Id = "456", LastName = "Van Halen" }; Person personThree = new Person { Id = "789", LastName = "White" }; //add em list.Add(personOne); list.Add(personTwo); list.Add(personThree); //send back return list; }