public void Vote(Vote newVote) { if (string.IsNullOrEmpty(newVote.restaurant)) { throw new Exception("Restaurante inválido!"); } ISingleton instSingle = SingletonTXT.getInstance(); if (!string.IsNullOrEmpty(instSingle.UsersVotedOnDay(newVote.date).Find(element => element.Contains(newVote.login)))) { throw new Exception("Usuário já votou neste dia!"); } instSingle.InsertVote(newVote); }