Пример #1
0
 public FuncionarioModel Consultar(Guid idUsuario)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         return(db.Funcionarios.Where(x => x.IdUsuario == idUsuario).FirstOrDefault());
     }
 }
Пример #2
0
 public List <NotificacaoModel> Consultar(Guid idUsuario)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         return(db.Notificacoes.Where(x => x.IdUsuario == idUsuario).ToList());
     }
 }
Пример #3
0
 public List <ExameModel> Consultar(Guid idPaciente, Guid idAnexo)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         return(db.Exames.Where(x => x.IdPaciente == idPaciente && x.IdAnexo == idAnexo).ToList());
     }
 }
Пример #4
0
 public List <PressaoModel> Consultar(Guid idPaciente)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         return(db.Pressoes.Where(x => x.IdPaciente == idPaciente).ToList());
     }
 }
Пример #5
0
 public PessoaModel Consultar(Guid id)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         return(db.Pessoas.Where(x => x.Id == id).FirstOrDefault());
     }
 }
Пример #6
0
 List <AgendaModel> IAgendaRepositorio.Consultar(Guid idUsuario)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         return(db.Agendas.Where(x => x.IdUsuario == idUsuario).ToList());
     }
 }
Пример #7
0
 public List <LocalModel> Consultar()
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         return(db.Locais.ToList());
     }
 }
Пример #8
0
 public List <ReceitaModel> Consultar(Guid idProntuario)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         return(db.Receitas.Where(x => x.IdProntuario == idProntuario).ToList());
     }
 }
Пример #9
0
 public Guid Salvar(PressaoModel pressao)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         db.Pressoes.Add(pressao);
         db.SaveChanges();
         return(pressao.Id);
     }
 }
Пример #10
0
 public Guid Salvar(PessoaModel pessoa)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         db.Pessoas.Add(pessoa);
         db.SaveChanges();
         return(pessoa.Id);
     }
 }
Пример #11
0
 public Guid Salvar(VacinaModel vacina)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         db.Vacinas.Add(vacina);
         db.SaveChanges();
         return(vacina.Id);
     }
 }
Пример #12
0
 public Guid Salvar(MedicamentoModel medicamento)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         db.Medicamentos.Add(medicamento);
         db.SaveChanges();
         return(medicamento.Id);
     }
 }
Пример #13
0
 public Guid Salvar(ProfissionalModel profissional)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         db.Profissionais.Add(profissional);
         db.SaveChanges();
         return(profissional.Id);
     }
 }
Пример #14
0
 public Guid Salvar(ReceitaModel receita)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         db.Receitas.Add(receita);
         db.SaveChanges();
         return(receita.Id);
     }
 }
Пример #15
0
 public Guid Salvar(AgendaModel agenda)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         db.Agendas.Add(agenda);
         db.SaveChanges();
         return(agenda.Id);
     }
 }
Пример #16
0
 public Guid Salvar(DadosMedicosModel dadosMedicos)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         db.DadosMedicos.Add(dadosMedicos);
         db.SaveChanges();
         return(dadosMedicos.Id);
     }
 }
Пример #17
0
 public Guid Salvar(ExameModel exame)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         db.Exames.Add(exame);
         db.SaveChanges();
         return(exame.Id);
     }
 }
Пример #18
0
 public Guid Salvar(NotificacaoModel local)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         db.Notificacoes.Add(local);
         db.SaveChanges();
         return(local.Id);
     }
 }
Пример #19
0
 public Guid Salvar(UsuarioModel usuario)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         db.Usuarios.Add(usuario);
         db.SaveChanges();
         return(usuario.Id);
     }
 }
Пример #20
0
 public Guid Salvar(PacienteModel paciente)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         db.Pacientes.Add(paciente);
         db.SaveChanges();
         return(paciente.Id);
     }
 }
Пример #21
0
 public Guid Salvar(FuncionarioModel funcionario)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         db.Funcionarios.Add(funcionario);
         db.SaveChanges();
         return(funcionario.Id);
     }
 }
Пример #22
0
 public Guid Salvar(ForumModel forum)
 {
     using (var db = new MainContextFactory().CreateDbContext(null))
     {
         db.Foruns.Add(forum);
         db.SaveChanges();
         return(forum.Id);
     }
 }