コード例 #1
0
        public object Clone()
        {
            var o = new SqlSentenceBuilder
            {
                Distinct  = Distinct,
                Separator = Separator
            };

            foreach (var part in Select)
            {
                o.Select.Add((Part)part.Clone());
            }
            foreach (var part in From)
            {
                o.From.Add((FromPart)part.Clone());
            }
            foreach (var part in Where)
            {
                o.Where.Add((WherePart)part.Clone());
            }
            foreach (var part in GroupBy)
            {
                o.GroupBy.Add((Part)part.Clone());
            }
            foreach (var part in Having)
            {
                o.Having.Add((Part)part.Clone());
            }
            foreach (var part in OrderBy)
            {
                o.OrderBy.Add((Part)part.Clone());
            }
            o.Paging = (Paging)Paging.Clone();
            return(o);
        }
コード例 #2
0
 public object Clone()
 {
     var o = new SqlSentenceBuilder
     {
         Distinct = Distinct,
         Separator = Separator
     };
     foreach (var part in Select)
     {
         o.Select.Add((Part)part.Clone());
     }
     foreach (var part in From)
     {
         o.From.Add((FromPart)part.Clone());
     }
     foreach (var part in Where)
     {
         o.Where.Add((WherePart)part.Clone());
     }
     foreach (var part in GroupBy)
     {
         o.GroupBy.Add((Part)part.Clone());
     }
     foreach (var part in Having)
     {
         o.Having.Add((Part)part.Clone());
     }
     foreach (var part in OrderBy)
     {
         o.OrderBy.Add((Part)part.Clone());
     }
     o.Paging = (Paging)Paging.Clone();
     return o;
 }