private string parametrosQuery(bool full) { if (full == false) { var semit = ListaAtributosTabela.Where(x => x.FIELD_NAME != ListaAtributosTabela.First().FIELD_NAME); return("{ " + string.Join(", ", semit.Select(e => e.FIELD_NAME + ": " + "body." + e.FIELD_NAME)) + " }"); } return("{ " + string.Join(", ", ListaAtributosTabela.Select(e => e.FIELD_NAME + ": " + "body." + e.FIELD_NAME)) + " }"); }
private StringBuilder Add() { var get = new StringBuilder(); get.Append($" public void Insert({NomeTabela.ToFirstCharToUpper()}Model entidade){N}"); get.Append($" {{{N}"); get.Append( $" var sql = $\"INSERT INTO {NomeTabela} ({string.Join(",", ListaAtributosTabela.Select(q => q.FIELD_NAME))}) VALUES\"{N}"); get.Append(AddParams()); get.Append($" ExecuteNonResult(sql); {N}"); get.Append($" }}{N}"); return(get); }