public LoginResponses Auth(LoginRequest model) { LoginResponses loginresponses = new LoginResponses(); using (var db = new BolsaContext()) { string spass = Encryptar.GetSHA256(model.Password); var user = db.Logins.Where(x => x.Usuario == model.Usuario && x.Contraseña == spass).FirstOrDefault(); if (user == null) { return(null); } else { loginresponses.Usuario = user.Usuario; loginresponses.Token = GetToken(user); loginresponses.TipoUsuario = user.TipoUsuario; loginresponses.Email = user.Email; } } return(loginresponses); }
public CategoriasController(BolsaContext context) { _context = context; }
public MonitoramentoController(BolsaContext context) { _context = context; }
public NegociacaoController(BolsaContext context) { _context = context; _monitoramentoController = new MonitoramentoController(context); _contaController = new ContaController(context); }
public LoginsController(BolsaContext context, ILoginService loginService) { _context = context; _loginService = loginService; }
public ContaController(BolsaContext context) { _context = context; }
public EmpleosController(BolsaContext context) { _context = context; }