Esempio n. 1
0
 public ActionResult Create(User user)
 {
     using (var um = new UserManager())
     {
         user = um.Create(user);
     }
     return RedirectToAction("List");
 }
Esempio n. 2
0
        public void CreateUserTest()
        {
            User user = new User();
            user.CompanyID = 1;
            user.CreatedOn = DateTime.Now;
            user.Email = "*****@*****.**";
            user.FirstName = "John2";
            user.LastName = "Ocker2s";
            user.Username = "******";

            using (var um = new UserManager())
            {
                user = um.Create(user);
            }

            Assert.IsTrue(user.ID > 0);
        }