Esempio n. 1
0
 public IEnumerable <SourceFragmentRefDefinition> GetSourceFragments()
 {
     if (InheritsBaseTables && _baseEntity != null)
     {
         return(_sourceFragments.Union(_baseEntity.GetSourceFragments(),
                                       new EqualityComparer <SourceFragmentRefDefinition, string>(item => item.Identifier)
                                       ).OrderBy(item => _sourceFragments.Any(p => p.Identifier == item.Identifier)?2:1));
     }
     return(_sourceFragments);
 }
        internal PropertyDefinition Clone(EntityDefinition entityDescription)
        {
            PropertyDefinition p = _Clone();

            p.Entity = entityDescription;
            var s = entityDescription.GetSourceFragments().SingleOrDefault(item =>
                                                                           item.Replaces != null && item.Replaces.Identifier == p.SourceFragment.Identifier);

            if (s != null)
            {
                p.SourceFragment = s;
            }
            return(p);
        }