Ejemplo n.º 1
0
        public async Task <ActionResult> Create([Bind(Include = "Id,Name,Phone,Email,Gender,Password,Country,Terms")] FormModel formModel)
        {
            if (ModelState.IsValid)
            {
                db.formModels.Add(formModel);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(formModel));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult> Create([Bind(Include = "Id,Name,Email,Age,Gender,Standard,Division,Image,birthdate,AcadmicStartDate,AcadmicEndDate,Hobby,OtherActivity")] AllForm allForm)
        {
            if (ModelState.IsValid)
            {
                db.Forms.Add(allForm);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(allForm));
        }