Esempio n. 1
0
        /// <summary>
        /// Action that shows metadata when model is non-<c>null</c>.
        /// </summary>
        public ActionResult Edit(User user)
        {
            ViewBag.Address = _addresses;
            ViewBag.Ages = _ages;
            ViewBag.Gift = "the banana";

            return View("Create");
        }
Esempio n. 2
0
        public User CreateUser()
        {
            User user = new User()
            {
                Name = "My name",
                Address = "My address"
            };

            return user;
        }
        private User CreateUser(string name)
        {
            User user = new User()
            {
                Name = name,
                Address = "My address"
            };

            return user;
        }
Esempio n. 4
0
 private void CreateSampleDatabaseEntry(){
     User user = new User()
     {   
         Id = Guid.NewGuid(),
         Name = "My name",
         Address = "My address"
     };
     context.Messages.Add( user );
     context.SaveChanges();
 }
Esempio n. 5
0
        public User CreateUser()
        {
            User user = new User()
            {
                Name = "이준혁",
                Address = "서울특별시 동대문구 용두동 793 BYC 청량리 오피스텔"
            };

            return user;
        }
Esempio n. 6
0
        public User CreateUser()
        {
            User user = new User()
            {
                Name = "Ian was here!",
                Address = "Up Nooooowwwff"
            };

            return user;
        }
Esempio n. 7
0
        public User CreateUser()
        {
            User user = new User()
            {
                Name = "My name change will show up",
                Address = "My address"
            };

            return user;
        }
Esempio n. 8
0
        public User CreateUser()
        {
            User user = new User()
            {
                Name = "Fnord Name",
                Address = "Fnord Address"
            };

            return user;
        }
 public void CreateUser()
 {
     User user = new User()
     {
         Id = Guid.NewGuid(),
         Name = "My name",
         Address = "My address"
     };
     if(dbContext == null){
         Console.WriteLine("IS NULL");
     }
     dbContext.Messages.Add(user);
     dbContext.SaveChanges();
 }
Esempio n. 10
0
 public ActionResult WithUser(int projectId, User user)
 {
     return Content("WithUser(int, User)");
 }
Esempio n. 11
0
 public ActionResult WithUser(User user)
 {
     return Content("WithUser(User)");
 }
Esempio n. 12
0
 /// <summary>
 /// Action that exercises query\form based model binding.
 /// </summary>
 public ActionResult SaveUser(User user)
 {
     return View("MyView", user);
 }
Esempio n. 13
0
        public User CreateUser()
        {
            User user = new User()
            {
                Name = "My name",
                Address = "My address",
                Alive = true,
                Age = 13,
                GPA = 13.37M,
                Dependent = new User()
                {
                    Name = "Dependents name",
                    Address = "Dependents address",
                    Alive = false,
                },
                Profession = "Software Engineer",
                About = "I like playing Football"
            };

            return user;
        }
Esempio n. 14
0
 public FiltersController()
 {
     CustomUser = new User() { Name = "User Name", Address = "Home Address" };
 }