public void Delete(User user) { var userDB = new UserDB(); userDB.ID = user.ID; userDB.Skills.Add(LogicToDB(user.Skills[0])); skillsAccess.Delete(userDB); }
public void DeleteTest() { var user = db.Users.FirstOrDefault(); var skill = db.Skills.FirstOrDefault(); user.Skills.Add(skill); db.SaveChanges(); skillsAccess.Delete(user); user = db.Users.FirstOrDefault(); Assert.AreEqual(0, user.Skills.Count); }