Beispiel #1
0
 public async Task <IActionResult> OnPost()
 {
     if (Request.Form["username"] != "" && Request.Form["pwd"] != "")
     {
         Object u = new
         {
             username    = Username,
             firstName   = Firstname,
             lastName    = Lastname,
             password    = Password,
             description = Description,
             street      = Street,
             zipCode     = ZipCode,
             city        = City,
             country     = Country
         };
         HttpRequests r = new HttpRequests();
         if (await r.CreateUserAsync(u) != HttpStatusCode.OK)
         {
             // Zeige Fehler an
         }
     }
     return(RedirectToPage("/Index"));
 }