public async Task <IActionResult> Create([Bind("Session,studentname,email,problemDetails,DrugList")] DailyStudentServiceList dailyStudentServiceList) { if (ModelState.IsValid) { _context.Add(dailyStudentServiceList); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(dailyStudentServiceList)); }
public async Task <IActionResult> Create([Bind("name,amount,Session")] DrugInfoPerStudent drugInfoPerStudent) { if (ModelState.IsValid) { _context.Add(drugInfoPerStudent); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(drugInfoPerStudent)); }