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)); }
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)); }
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)); }
public async Task <IActionResult> Create([Bind("Id")] Schedule scheduleModel) { if (ModelState.IsValid) { _context.Add(scheduleModel); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(scheduleModel)); }
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); }