public async Task <List <Usuarios> > GetList() { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Usuarios.Include(x => x.Grupos).ToListAsync()); } }
public async Task <List <Periodo> > GetList() { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Periodo.ToListAsync()); } }
public async Task <List <Logs> > GetList() { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Logs.ToListAsync()); } }
public async Task <int> GetCount(string id) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Periodo.Where(x => x.PeriodoNome.ToUpper() == id.ToUpper()).CountAsync()); } }
public async Task <List <Logs> > GetList(int UserID) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Logs.Include(x => x.Usuarios).Where(x => x.UsuariosId == UserID).ToListAsync()); } }
public async Task <int> GetCount() { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.professor_Disciplina.CountAsync()); } }
public async Task <int> GetCount() { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Macs1.CountAsync()); } }
public async Task <int> GetCount(string nome) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Classes.Where(x => x.ClassesNome.ToUpper() == nome.ToUpper()).CountAsync()); } }
public async Task <int> GetCount(string nome) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Escola.CountAsync()); } }
public async Task <List <Grupos> > GetList(int param) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Grupos.Where(x => x.GrupoId == param) .ToListAsync()); } }
public async Task <List <Faltas> > GetList() { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Faltas.Include(x => x.Alunos) .ToListAsync()); } }
public async Task <int> GetCount(object value) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Alunos.Where(x => x.Nome == value.ToString()) .CountAsync()); } }
public async Task <int> GetCount(object value) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Macs1.Where(x => x.TrimestreID == (int)value) .CountAsync()); } }
public async Task <Usuarios> GetListFirstOrDefault() { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Usuarios .FirstOrDefaultAsync()); } }
public async Task <int> GetCount(object value) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Disciplina.Where(x => x.Designacao == value.ToString()) .CountAsync()); } }
public async Task <List <Permissoes> > GetList() { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Permissoes.Include(x => x.Grupo) .ToListAsync()); } }
public async Task <List <Logs> > GetList(string param) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Logs.Where(x => x.Operacao.ToLower().Contains(param.ToLower())) .ToListAsync()); } }
public async Task <List <Alunos> > GetList(string param) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Alunos.Where(x => x.Nome.ToLower().Contains(param.ToLower())) .ToListAsync()); } }
public async Task <List <Disciplina> > GetList(string param) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Disciplina.Where(x => x.Designacao.ToLower().Contains(param.ToLower())) .ToListAsync()); } }
public async Task <int> GetCount(string value, string Bi) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Professor.Where(x => x.Nome == value.ToString() && x.Bi == Bi) .CountAsync()); } }
public async Task <List <Professor> > GetList() { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Professor .OrderBy(x => x.Nome) .ToListAsync()); } }
public async Task <int> GetCount(int professor, int disciplina) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.professor_Disciplina.Where(x => x.DisciplinaID == disciplina && x.ProfessorID == professor) .CountAsync()); } }
public async Task <Permissoes> GetList(int param) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Permissoes.Include(x => x.Grupo) .Where(x => x.GrupoId == param) .FirstOrDefaultAsync()); } }
public async Task <List <Permissoes> > GetList(string param) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Permissoes.Include(x => x.Grupo) .Where(x => x.Grupo.GrupoNome.ToLower().Contains(param.ToLower())) .ToListAsync()); } }
public async Task <List <Disciplina> > GetList() { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Disciplina .OrderBy(x => x.Designacao) .ToListAsync()); } }
public async Task <int> GetCount(string nome, string republica, string ministerio) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Escola.Where(x => x.Nome.ToUpper() == nome.ToUpper() && x.republica.ToUpper() == republica.ToUpper() && x.Ministerio.ToUpper() == ministerio.ToUpper()).CountAsync()); } }
public async Task <List <Alunos> > GetList() { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Alunos.Include(x => x.Turmas) .Include(x => x.Faltas) .OrderBy(x => x.Nome) .ToListAsync()); } }
public async Task <List <Macs> > GetList(int turma) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Macs1.Include(x => x.Alunos) .Include(x => x.Trimestres) .Where(x => x.Alunos.TurmasID == turma) .ToListAsync()); } }
public async Task <List <Macs> > GetList(string param) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Macs1.Include(x => x.Alunos) .Include(x => x.Trimestres) .Where(x => x.Alunos.Nome.ToLower().Contains(param.ToLower())) .ToListAsync()); } }
public async Task <int> GetCount(string nome, int classe1, int periodo, int cursos) { using (AppProfessorContext db = new AppProfessorContext()) { return(await db.Turmas.Where(x => x.TurmasNome.ToUpper() == nome.ToUpper() && x.ClassesID == classe1 && x.PeriodoID == periodo && x.CursosID == cursos).CountAsync()); } }