public void Edit(StandardGeneticLine item)
 {
     foreach (var standardItem in item.StandardItems)
     {
         standardItem.StandardGeneticLineId = item.Id;
         Uow.StandardItems.Edit(standardItem);
     }
     Uow.Commit();
 }
 public void Create(StandardGeneticLine item)
 {
     foreach (var standardItem in item.StandardItems)
     {
         standardItem.Id = Guid.NewGuid();
         standardItem.IsDeleted = false;
         standardItem.CreatedDate = _clock.Now;
     }
     Uow.StandardGeneticLines.Add(item);
     Uow.Commit();
 }
        public StandardGeneticLine ToStandardGeneticLine()
        {
            var item = new StandardGeneticLine()
            {
                GeneticLineId = this.StandardGeneticLine.GeneticLine.Id,
                StandardId = this.StandardGeneticLine.Standard.Id,
                Id = this.StandardGeneticLine.Id
            };

            if (this.StandardGeneticLine.Standard.AllowDecimal)
            {
                item.StandardItems = this.StandardItems.Select(si => new StandardItem()
                {
                    Sequence = si.Sequence,
                    Value1 = si.Value1,
                    Value2 = si.Value2,
                    Id = si.Id
                }).ToList();
            }
            else
            {
                item.StandardItems = this.IntegerStandardItems.Select(si => new StandardItem()
                {
                    Sequence = si.Sequence,
                    Value1 = Convert.ToDecimal(si.Value1),
                    Value2 = si.Value2 != null ? Convert.ToDecimal(si.Value2) : (decimal?)null,
                    Id = si.Id
                }).ToList();
            }

            return item;
        }