protected static void Deletar(EntidadeDeBanco objeto, string nomeTabela) { if (objeto == null) { return; } DeletarPorId(objeto.Id, nomeTabela); objeto.Id = 0; }
protected long GetId(EntidadeDeBanco value) { if (value == null) { return(0); } else { return(value.Id); } }
protected static void Deletar(EntidadeDeBanco objeto, string nomeTabela) { if (objeto == null) { return; } using (IDbConnection cnn = new SQLiteConnection(GetConnectionString())) { cnn.Execute($"DELETE FROM {nomeTabela} WHERE Id = @Id", objeto); objeto.Id = 0; } }