Ejemplo n.º 1
0
        public async Task <IActionResult> Create([Bind("Id,Description,Location,Room")] Space space)
        {
            if (ModelState.IsValid)
            {
                _context.Add(space);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(space));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("Id,City,Contact,Domain,Name,Phone,State,Street,ZipCode")] School school)
        {
            if (ModelState.IsValid)
            {
                _context.Add(school);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(school));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Create([Bind("Id,GradeLevel,StudentSchoolId,StudentsSchool,fName,lName,IsActive")] Student student)
        {
            if (ModelState.IsValid)
            {
                _context.Add(student);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(student));
        }
Ejemplo n.º 4
0
        public async Task <IActionResult> Create([Bind("Id")] Schedule scheduleModel)
        {
            if (ModelState.IsValid)
            {
                _context.Add(scheduleModel);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(scheduleModel));
        }
Ejemplo n.º 5
0
        public async Task <IActionResult> Create([Bind("Id,FromValue,From,Label,ToValue,To")] Schedule schedule)
        {
            // if (ModelState.IsValid)
            // {
            _context.Add(schedule);
            await _context.SaveChangesAsync();

            return(RedirectToAction("Index"));
            // }
            //return View(schedule);
        }