public async Task <ActionResult> Register(BreakModel model) { if (ModelState.IsValid) { BreakDataAccess breakDataAccess = new BreakDataAccess(); breakDataAccess.Create(model); return(RedirectToAction("List", "Break")); } // If we got this far, something failed, redisplay form return(View(model)); }
public void CreateTest() { BreakModel breakModel = new BreakModel(); breakModel.Brand = "Brembo"; breakModel.Name = "Brembo"; breakModel.Size = "400 mm"; breakModel.Type = "Racing"; BreakDataAccess breakDataAccess = new BreakDataAccess(); breakDataAccess.Create(breakModel); Assert.IsNotNull(breakModel); }