Beispiel #1
0
 public void AddExtraKeys(List <ExtraProductKey> keys)
 {
     if (keys != null && keys.Count > 0)
     {
         ExtraKeys.AddRange(keys);
     }
 }
Beispiel #2
0
        public Product(ProductEntity entity) : this()
        {
            if (entity == null)
            {
                return;
            }

            Key       = entity.Key;
            Name      = entity.Name;
            DateAdded = entity.DateAdded;

            if (entity.ExtraKeys != null && entity.ExtraKeys.Count > 0)
            {
                ExtraKeys.AddRange(entity.ExtraKeys.Select(e => new ExtraProductKey(e)));
            }
        }