public bool RemoveChild(Classifier end1, Classifier end2)
{
Contract.Requires(end1 != null && end1.Id >= 0);
Contract.Requires(end2 != null && end2.Id >= 0);
bool result = false;
using (IUnitOfWork uow = this.GetUnitOfWork())
{
IRepository<Classifier> repo = uow.GetRepository<Classifier>();
end1 = repo.Reload(end1);
repo.LoadIfNot(end1.Children);
end2 = repo.Reload(end2);
repo.LoadIfNot(end2.Parent);
if (end1.Children.Contains(end2) || end2.Parent.Equals(end1))
{
end1.Children.Remove(end2);
end2.Parent = null;
uow.Commit();
result = true;
}
}
return (result);
}