static void Main(string[] args) { bool nb = false; if (nb) { using (SI2_T1Entities db = new SI2_T1Entities()) { NBench.Bench(() => db.Autor.Where(x => x.userID == 4), "select * from autor where userid=4"); //21248 NBench.Bench(() => db.Conferencia.Where(x => x.ID == 1).Select(u => u.nome), "select nome from conferencia where ID=1"); //10624 NBench.Bench(() => db.UpdateNotaConferencia(1, 80), "Update Nota Conferencia"); //896 NBench.Bench(() => db.listCompatibleReviewers(1, 1), "Compatible Reviewers"); //41760 string s = Console.ReadLine(); } } else { App.Instance.Run(); } }
private void UpdateNotaConferencia() { //TODO: Implement Console.WriteLine("UpdateNotaConferencia()"); Console.WriteLine("(1)Insira ConferenceID"); int i = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("(80)Insira nota"); int n = Convert.ToInt32(Console.ReadLine()); using (SI2_T1Entities db = new SI2_T1Entities()) { Console.WriteLine("Conferencia Atual"); Conferencia c1 = db.Conferencia.Where((x) => x.ID == i).FirstOrDefault(); Console.WriteLine("Conferencia: {0} tem nota {1}", c1.ID, c1.nota_minima); db.UpdateNotaConferencia(i, n); } using (SI2_T1Entities db = new SI2_T1Entities()) { Console.WriteLine("Conferencia Atualizada"); Conferencia c2 = db.Conferencia.Where((x) => x.ID == i).FirstOrDefault(); Console.WriteLine("Conferencia: {0} tem nota {1}", c2.ID, c2.nota_minima); } }