}//LoginSubmit public async Task <IActionResult> NewUser([Bind("Email,Username,Password")] UserLogin Register) { if (ModelState.IsValid) { _context.Add(Register); await _context.SaveChangesAsync(); return(RedirectToAction("Login", "Users")); } return(View()); }//NewUser
}//DuplicateCheck (Check against user input) public JsonResult AddFiles(string FileName, string Desc) { AudioFiles AudioFile = new AudioFiles() { File = FileName, Description = Desc }; bool Exists = AlreadyExists(null, AudioFile.File); if(!Exists) { _context.Add(AudioFile); _context.SaveChanges(); return Json("Added"); } else if(Exists) { return Json("Duplicate"); } return Json("Failed"); }//AddFiles (Create)