public int ExisteLogin(string login) { using (WildSaverContext contexto = new WildSaverContext()) { return(contexto.Usuarios.Where(usuario => usuario.Login == login).Count()); } }
public Usuario BuscarUsuarioSenha(Usuario u) { using (WildSaverContext contexto = new WildSaverContext()) { return(contexto.Usuarios.FirstOrDefault(usuario => usuario.Login == u.Login && usuario.Senha == u.Senha)); } }
public IList <Usuario> Lista() { using (WildSaverContext contexto = new WildSaverContext()) { return(contexto.Usuarios.ToList()); } }
public void Atualizar(Usuario u) { using (WildSaverContext contexto = new WildSaverContext()) { contexto.Update(u); contexto.SaveChanges(); } }
public void Remover(Usuario u) { using (WildSaverContext contexto = new WildSaverContext()) { contexto.Usuarios.Remove(u); contexto.SaveChanges(); } }
public void Adicionar(Usuario u) { using (WildSaverContext contexto = new WildSaverContext()) { contexto.Usuarios.Add(u); contexto.SaveChanges(); } }
public OrdemDAL() { contexto = new WildSaverContext(); }
public DenunciaDAL() { contexto = new WildSaverContext(); }
public ClasseDAL() { contexto = new WildSaverContext(); }
public EnderecoDAL() { contexto = new WildSaverContext(); }
public FamiliaDAL() { contexto = new WildSaverContext(); }
public NoticiaDAL() { contexto = new WildSaverContext(); }
public PessoaDAL() { contexto = new WildSaverContext(); }
public RegiaoDAL() { contexto = new WildSaverContext(); }
public AnimalDAL() { contexto = new WildSaverContext(); }
public FiloDAL() { contexto = new WildSaverContext(); }
public GeneroDAL() { contexto = new WildSaverContext(); }