Ejemplo n.º 1
0
        /// <summary>
        /// 实体-创建value
        /// </summary>
        public void DynamicPropertyTest5()
        {
            var companyNameProperty = _dynamicPropertyManager.Get("CompanyName");
            List <DynamicEntityProperty> propertyList  = _dynamicEntityPropertyManager.GetAll(typeof(Contract).FullName);
            DynamicEntityProperty        dynamicEntity = propertyList.FirstOrDefault(x => x.DynamicPropertyId == companyNameProperty.Id);

            DynamicEntityPropertyValue value1 = new DynamicEntityPropertyValue(dynamicEntity, "08d936e2-88fa-4ca0-823b-b7f454685c8d",
                                                                               "伊泰集团", 1);

            _dynamicEntityPropertyValueManager.Add(value1);
        }
 public static List <DynamicEntityProperty> GetAll <TEntity, TPrimaryKey>(this IDynamicEntityPropertyManager manager)
     where TEntity : IEntity <TPrimaryKey>
 {
     return(manager.GetAll(entityFullName: typeof(TEntity).FullName));
 }
 public static List <DynamicEntityProperty> GetAll <TEntity>(this IDynamicEntityPropertyManager manager)
     where TEntity : IEntity <int>
 {
     return(manager.GetAll <TEntity, int>());
 }