public string SelectEntitesTable(SqlRelationModel model)
        {
            SelectTemplate template = new SelectTemplate();
            StringBuilder  sql      = new StringBuilder();

            sql.Append(template.SelectAll(model.EntityModel));
            sql.Append(JoinRule(model, model.Tables));
            return(sql.ToString());
        }
Beispiel #2
0
 static SqlTemplate()
 {
     Select  = new SelectTemplate();
     Update  = new UpdateTemplate();
     Delete  = new DeleteTemplate();
     Insert  = new InsertTemplate();
     Repeate = new RepeateTemplate();
     Count   = new CountTemplate();
 }
        public string SelectEntitesSource(SqlRelationModel model)
        {
            SelectTemplate template = new SelectTemplate();
            StringBuilder  sql      = new StringBuilder();

            model.UseDefaultFilter();
            sql.Append(template.SelectAll(model.EntityModel));
            sql.Append(JoinRule(model, model.Sources));
            model.ClearFilter();
            return(sql.ToString());
        }