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