public static List <Periodo> GetPeriodo(string idCurso) { database db = getDataBase(); var query = from p in db.Periodo where p.IdCurso == idCurso select p; List <Periodo> periodo = new List <Periodo>(query.AsEnumerable()); return(periodo); }
public static List <Disciplina> GetDisciplina(string idPeriodo) { database db = getDataBase(); var query = from d in db.Disciplina where d.idPeriodo == idPeriodo select d; List <Disciplina> disciplina = new List <Disciplina>(query.AsEnumerable()); return(disciplina); }
public static void DropGraus() { database db = getDataBase(); if (db.DatabaseExists() == true) { db.DeleteDatabase(); } }
public static List <Graus> GetGraus(string idDisciplina) { database db = getDataBase(); var query = from g in db.Graus where g.idDisciplina == idDisciplina select g; List <Graus> graus = new List <Graus>(query.AsEnumerable()); return(graus); }
private static database getDataBase() { database db = new database(); if (db.DatabaseExists() == false) { db.CreateDatabase(); } return(db); }