示例#1
0
        public bool IsPartOfCompositeAggregations(PropertyInfo propertyInfo)
        {
            if (propertyInfo == null)
            {
                return(false);
            }
            if (CompositeAggregations == null)
            {
                return(false);
            }

            return
                (CompositeAggregations.Any(item => item.PropertyType.FullName.Equals(propertyInfo.PropertyType.FullName)));
        }
示例#2
0
 private void CancelEditMembers()
 {
     CompositeAggregations.ToList()
     .ForEach(pi =>
     {
         var collection = GetProperty(pi.Name) as IList;
         if (collection != null)
         {
             var newEntities = collection.Cast <object>().OfType <BaseEntity>()
                               .Where(entity => entity.IsNew)
                               .ToList();
             newEntities.ForEach(collection.Remove);
         }
     });
 }