Ejemplo n.º 1
0
 public HttpResponseMessage EmailCheck([FromUri] string email)
 {
     try
     {
         if (email != null)
         {
             if (userBDC.FindUserByEmail(email))
             {
                 return(Request.CreateResponse(HttpStatusCode.OK, true));
             }
             else
             {
                 return(Request.CreateResponse(HttpStatusCode.OK, false));
             }
         }
         else
         {
             return(Request.CreateResponse(HttpStatusCode.BadRequest, ModelState));
         }
     }
     catch (Exception)
     {
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, false));
     }
 }