public Methodology Create(string appliedStandards, string tools, string tolerance, string procedure)
{
Contract.Requires(!string.IsNullOrWhiteSpace(procedure));
Contract.Ensures(Contract.Result<Methodology>() != null && Contract.Result<Methodology>().Id >= 0);
Methodology u = new Methodology()
{
AppliedStandards = appliedStandards,
Tools = tools,
Tolerance = tolerance,
Procedure = procedure,
};
using (IUnitOfWork uow = this.GetUnitOfWork())
{
IRepository<Methodology> repo = uow.GetRepository<Methodology>();
repo.Put(u);
uow.Commit();
}
return (u);
}