Esempio n. 1
0
        static void AddStudent(Default.Container container, StudentService.Models.Student student)
        {
            container.AddToStudents(student);
            var serviceResponse = container.SaveChanges();

            foreach (var operationResponse in serviceResponse)
            {
                Console.WriteLine("Response: {0}", operationResponse.StatusCode);
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            // TODO: Replace with your local URI.
            string serviceUri = "http://localhost:62338/";
            var    container  = new Default.Container(new Uri(serviceUri));

            var student = new StudentService.Models.Student()
            {
                FirstName = "Angela",
                LastName  = "Lavery",
                Subject   = "Software Engineering"
            };

            AddStudent(container, student);
            ListAllStudents(container);
        }