Exemplo n.º 1
0
        public string UpdateInstructorInfo(Instructor instructor)
        {
            var errors     = new List <string>();
            var repository = new InstructorRepository();
            var service    = new InstructorService(repository);

            service.UpdateInstructorInfo(new Instructor()
            {
                Id = instructor.Id, FirstName = instructor.FirstName, LastName = instructor.LastName
            }, ref errors);

            if (errors.Count == 0)
            {
                return("ok");
            }

            return("error");
        }