Example #1
0
        public HttpResponseMessage SaveStudent(HttpRequestMessage request, StudentViewModel student)
        {
            var newStudent = student.ReverseMap();

            _studentApi.SaveStudent(newStudent);

            var model = new StudentViewModel();

            var studentVm = model.MapSingleStudent(newStudent);

            var response = request.CreateResponse(HttpStatusCode.Created, studentVm);

            return(response);
        }