public ActionResult Register(FormCollection from) { string username, password, email; username = from["username"]; password = from["password"]; email = from["email"]; Coutomer ctomer = new Coutomer { Email = email, Name = username, Password = Cryptography.GetMD5Hash(password), RevordDate = DateTime.Now, }; if (membership.RegisterCoutomer(ctomer)) { return RedirectToAction("Login"); } ViewBag["error"] = "Lüten bilgileriniz kontrol ediniz..."; return View(); }
public bool RegisterCoutomer(Coutomer coutomer) { CoustomerValidation cvalidation = new CoustomerValidation(); if (cvalidation.Validate(coutomer).IsValid) { this.coutomerDataStore.Insert(coutomer); return true; } return false; }