public AggregateFunction Create(string name, string description)
{
Contract.Requires(!string.IsNullOrWhiteSpace(name));
Contract.Ensures(Contract.Result<AggregateFunction>() != null && Contract.Result<AggregateFunction>().Id >= 0);
AggregateFunction u = new AggregateFunction()
{
Name = name,
Description = description,
};
using (IUnitOfWork uow = this.GetUnitOfWork())
{
IRepository<AggregateFunction> repo = uow.GetRepository<AggregateFunction>();
repo.Put(u);
uow.Commit();
}
return (u);
}