public bool AddDynamicPropery(string name, string value)
        {
            var alreadyExists = context.DynamicProperties.Any(p => p.Name == name && p.Value == value);

            if (alreadyExists)
            {
                return(false);
            }
            else
            {
                DynamicProperties p = new DynamicProperties()
                {
                    Name  = name,
                    Value = value
                };
                context.DynamicProperties.Add(p);
                context.SaveChanges();
                return(true);
            }
        }
예제 #2
0
 public PropertyDTO(DynamicProperties propery)
 {
     this.Name  = propery.Name;
     this.Value = propery.Value;
 }