public void Inserir(Sessao s) { using (training_logContext tc = new training_logContext()) { tc.Sessoes.Add(s); tc.SaveChanges(); } }
public ICollection <Sessao> ListarTodos() { using (training_logContext tc = new training_logContext()) { IQueryable <Sessao> query; query = tc.Sessoes; return(query.ToList()); } }