public void Create_CreatingSection_ShouldCreateSection() { // Arrange var entity = new Section { Name = "Test" }; var before = _db.Sections.Count(); // Act _service.Create(entity); _service.Commit(); // Assert Assert.Equal(1, _db.Sections.Count() - before); }
public IActionResult Edit(SectionContentViewModel model) { _sectionService.UpdateAssignement(model); _sectionService.Commit(); return(RedirectToAction("Index")); }