public static User GetLoggedUser(this HttpContext Context, RobocamDbContext context) { User user = Context.Session.Get <User>("CurrentUser"); if (user != null) { //refresh data //make extra function to just set necessary session data to not call the database user = context.Users.Find(user.UserId); } return(user); }
public AuthController(RobocamDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public BaseGetService(RobocamDbContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public CommandsService(RobocamDbContext context, IMapper mapper) : base(context, mapper) { }