public bool Delete(AggregateFunction entity)
{
Contract.Requires(entity != null);
Contract.Requires(entity.Id >= 0);
using (IUnitOfWork uow = this.GetUnitOfWork())
{
IRepository<AggregateFunction> repo = uow.GetRepository<AggregateFunction>();
entity = repo.Reload(entity);
//relation to DataContainer is managed by the other end
repo.Delete(entity);
uow.Commit();
}
// if any problem was detected during the commit, an exception will be thrown!
return (true);
}