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); }
public void InsertSourceFragments(int pos, SourceFragmentRefDefinition sf) { CheckSourceFragment(sf); _sourceFragments.Insert(pos, sf); }
public void AddSourceFragment(SourceFragmentRefDefinition sf) { CheckSourceFragment(sf); _sourceFragments.Add(sf); }