Esempio n. 1
0
        // PUT: api/StudentApi/5
        public IHttpActionResult Put(StudentModel student)
        {
            StudentDto sd = new StudentDto();

            if (sd.GetStudent().Find(stud => stud.Id == student.Id) == null)
            {
                return(BadRequest("Not found"));
            }
            else
            {
                if (sd.UpdateStudent(student))
                {
                    return(Ok());
                }
            }
            return(BadRequest());
        }