public ExtendedPropertyValue CreateExtendedPropertyValue(Int64 extendedPropertyId, string value, string note, DateTime samplingTime, DateTime resultTime, ObtainingMethod obtainingMethod,
DatasetVersion datasetVersion)
{
Contract.Requires(!string.IsNullOrWhiteSpace(value));
Contract.Requires(extendedPropertyId > 0);
Contract.Requires(datasetVersion != null);
Contract.Ensures(Contract.Result<ExtendedPropertyValue>() != null);
ExtendedPropertyValue e = new ExtendedPropertyValue()
{
Value = value,
Note = note,
SamplingTime = samplingTime,
ResultTime = resultTime,
ObtainingMethod = obtainingMethod,
ExtendedPropertyId = extendedPropertyId,
DatasetVersion = datasetVersion, // subject to delete
};
e.DatasetVersion.ExtendedPropertyValues.Add(e);
//using (IUnitOfWork uow = this.GetUnitOfWork())
//{
// IRepository<ExtendedPropertyValue> repo = uow.GetRepository<ExtendedPropertyValue>();
// repo.Put(e);
// uow.Commit();
//}
return (e);
}