Example #1
0
        public Person Update(Person person)
        {
            //set property
            person.LastName = "Van Halen";

            //send back
            return person;
        }
Example #2
0
        public Person Create(Person person)
        {
            //set id
            person.Id = "5678";

            //send it back with new id
            return person;
        }
Example #3
0
        public Person Get(string id)
        {
            //create person
            Person person = new Person();

            //set properties
            person.Id = "5150";
            person.LastName = "Van Halen";

            //send back
            return person;
        }
Example #4
0
        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;
        }