public async Task <IActionResult> Create([Bind("ID,Y,X1,X2,X3,X4,X5,X6")] DataPoint dataPoint) { if (ModelState.IsValid) { _context.Add(dataPoint); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(dataPoint)); }
public async Task <IActionResult> Create([Bind("ID,Name,Percentage1,Percentage2,Percentage3,Percentage4,Percentage5,Percentage6,Created")] DataModel dataModel) { if (ModelState.IsValid) { _context.Add(dataModel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(dataModel)); }