public User(String first_name, String last_name, String email) { this.UserID = Guid.NewGuid(); this.first_name = first_name; this.last_name = last_name; this.email = email; this.locker = new Locker(this.UserID); this.locker.owner = this; }
public ActionResult Create(Locker locker) { if (ModelState.IsValid) { locker.LockerID = Guid.NewGuid(); repository.Add(locker); repository.Commit(); return RedirectToAction("Index"); } return View(locker); }
//Methods public int add_item(Locker new_item) { return(1); }
public ActionResult Edit(Locker locker) { if (ModelState.IsValid) { repository.Attach(locker); repository.Commit(); return RedirectToAction("Index"); } return View(locker); }