private void TestDelete <T>(DAL.Abstractions.IGenericRepository <T> rep, T entity) { ChangeColor(); Console.WriteLine($"Delete {entity}"); ReturnColor(); rep.Delete(entity); rep.Save(); }
private void TestDeleteById <T>(DAL.Abstractions.IGenericRepository <T> rep) { ChangeColor(); int rand = random.Next(rep.Get().Count()) + 1; Console.WriteLine($"Test DeleteById(id) id={rand}"); Console.WriteLine(rep.GetById(rand)); rep.Delete(rand); rep.Save(); ReturnColor(); }