public void Delete() { //Act repository.Delete(id); context.SaveChanges(); var result = repository.GetAll().ToList(); //Assert Assert.IsNotNull(result); Assert.AreEqual(207, result.Count); Assert.AreNotEqual(1, result[0].ID); }
public IdentityRole Delete(string id) { var res = _roleRepository.SelectById(id); _roleRepository.Delete(id); lichSuServices.Create(new LichSu { HanhDong = Constant.DeleteAction, TenTaiKhoan = HttpContext.Current.User.Identity.Name, NoiDung = id.ToString(), ViTriThaoTac = Constant.Role }); return(res); }