Beispiel #1
0
        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);
        }
Beispiel #2
0
 public AuthController(RobocamDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Beispiel #3
0
 public BaseGetService(RobocamDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Beispiel #4
0
 public CommandsService(RobocamDbContext context, IMapper mapper) : base(context, mapper)
 {
 }