Beispiel #1
0
 public ActionResult InstructorRegistration(Instructor ins)
 {
     //if mail exists error
     //getInstructorby Mail
     if (ins == null)
     {
         return(BadRequest());
     }
     //GeInsBy mail
     if (_db.GetInstructorByMail(ins.Mail) != null || _db.GetStudentByMail(ins.Mail) != null)
     {
         return(BadRequest("Mail is Exists Try another one "));//400
     }
     if (ModelState.IsValid)
     {
         return(Ok(_db.AddInstructor(ins)));
     }
     else
     {
         return(BadRequest("Values Are not ok"));
     }
 }