public void AddSomeone() { var newbie = new Tenant("Colm"); NhSession.Save(newbie); }
public ActionResult CreatePerson(string newUserName) { var newPerson = new Tenant(newUserName){ Instance = CurrentUser.Instance}; var alreadyExists = NhSession.Query<Tenant>().Where(x => x.Name == newUserName); if (alreadyExists.Any()) { var message = "There's already a user called " + newUserName + "."; return RedirectToAction("Index", message); } NhSession.Save(newPerson); return RedirectToAction("Index"); }