public FuncionarioModel Consultar(Guid idUsuario) { using (var db = new MainContextFactory().CreateDbContext(null)) { return(db.Funcionarios.Where(x => x.IdUsuario == idUsuario).FirstOrDefault()); } }
public List <NotificacaoModel> Consultar(Guid idUsuario) { using (var db = new MainContextFactory().CreateDbContext(null)) { return(db.Notificacoes.Where(x => x.IdUsuario == idUsuario).ToList()); } }
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()); } }
public List <PressaoModel> Consultar(Guid idPaciente) { using (var db = new MainContextFactory().CreateDbContext(null)) { return(db.Pressoes.Where(x => x.IdPaciente == idPaciente).ToList()); } }
public PessoaModel Consultar(Guid id) { using (var db = new MainContextFactory().CreateDbContext(null)) { return(db.Pessoas.Where(x => x.Id == id).FirstOrDefault()); } }
List <AgendaModel> IAgendaRepositorio.Consultar(Guid idUsuario) { using (var db = new MainContextFactory().CreateDbContext(null)) { return(db.Agendas.Where(x => x.IdUsuario == idUsuario).ToList()); } }
public List <LocalModel> Consultar() { using (var db = new MainContextFactory().CreateDbContext(null)) { return(db.Locais.ToList()); } }
public List <ReceitaModel> Consultar(Guid idProntuario) { using (var db = new MainContextFactory().CreateDbContext(null)) { return(db.Receitas.Where(x => x.IdProntuario == idProntuario).ToList()); } }
public Guid Salvar(PressaoModel pressao) { using (var db = new MainContextFactory().CreateDbContext(null)) { db.Pressoes.Add(pressao); db.SaveChanges(); return(pressao.Id); } }
public Guid Salvar(PessoaModel pessoa) { using (var db = new MainContextFactory().CreateDbContext(null)) { db.Pessoas.Add(pessoa); db.SaveChanges(); return(pessoa.Id); } }
public Guid Salvar(VacinaModel vacina) { using (var db = new MainContextFactory().CreateDbContext(null)) { db.Vacinas.Add(vacina); db.SaveChanges(); return(vacina.Id); } }
public Guid Salvar(MedicamentoModel medicamento) { using (var db = new MainContextFactory().CreateDbContext(null)) { db.Medicamentos.Add(medicamento); db.SaveChanges(); return(medicamento.Id); } }
public Guid Salvar(ProfissionalModel profissional) { using (var db = new MainContextFactory().CreateDbContext(null)) { db.Profissionais.Add(profissional); db.SaveChanges(); return(profissional.Id); } }
public Guid Salvar(ReceitaModel receita) { using (var db = new MainContextFactory().CreateDbContext(null)) { db.Receitas.Add(receita); db.SaveChanges(); return(receita.Id); } }
public Guid Salvar(AgendaModel agenda) { using (var db = new MainContextFactory().CreateDbContext(null)) { db.Agendas.Add(agenda); db.SaveChanges(); return(agenda.Id); } }
public Guid Salvar(DadosMedicosModel dadosMedicos) { using (var db = new MainContextFactory().CreateDbContext(null)) { db.DadosMedicos.Add(dadosMedicos); db.SaveChanges(); return(dadosMedicos.Id); } }
public Guid Salvar(ExameModel exame) { using (var db = new MainContextFactory().CreateDbContext(null)) { db.Exames.Add(exame); db.SaveChanges(); return(exame.Id); } }
public Guid Salvar(NotificacaoModel local) { using (var db = new MainContextFactory().CreateDbContext(null)) { db.Notificacoes.Add(local); db.SaveChanges(); return(local.Id); } }
public Guid Salvar(UsuarioModel usuario) { using (var db = new MainContextFactory().CreateDbContext(null)) { db.Usuarios.Add(usuario); db.SaveChanges(); return(usuario.Id); } }
public Guid Salvar(PacienteModel paciente) { using (var db = new MainContextFactory().CreateDbContext(null)) { db.Pacientes.Add(paciente); db.SaveChanges(); return(paciente.Id); } }
public Guid Salvar(FuncionarioModel funcionario) { using (var db = new MainContextFactory().CreateDbContext(null)) { db.Funcionarios.Add(funcionario); db.SaveChanges(); return(funcionario.Id); } }
public Guid Salvar(ForumModel forum) { using (var db = new MainContextFactory().CreateDbContext(null)) { db.Foruns.Add(forum); db.SaveChanges(); return(forum.Id); } }