Esempio n. 1
0
        public void RemoveSourceFragment(SourceFragmentRefDefinition sf)
        {
            int index = _sourceFragments.IndexOf(item => item.Identifier == sf.Identifier);

            if (index >= 0)
            {
                _sourceFragments.RemoveAt(index);
            }
        }
        public string GetDiscriminator()
        {
            SourceFragmentRefDefinition tbl = Entity.OwnSourceFragments.SingleOrDefault(item => item.Identifier == SourceFragment.Identifier);

            if (tbl != null)
            {
                var s = tbl.Conditions.SingleOrDefault(item => item.LeftColumn == SourceFieldExpression && !string.IsNullOrEmpty(item.RightConstant));
                if (s != null)
                {
                    return(s.RightConstant);
                }
            }
            return(null);
        }
Esempio n. 3
0
 public void InsertSourceFragments(int pos, SourceFragmentRefDefinition sf)
 {
     CheckSourceFragment(sf);
     _sourceFragments.Insert(pos, sf);
 }
Esempio n. 4
0
 public void AddSourceFragment(SourceFragmentRefDefinition sf)
 {
     CheckSourceFragment(sf);
     _sourceFragments.Add(sf);
 }