Exemple #1
0
 public GroupService(SurveillanceContext db, IUserService userService, IMapper mapper,
                     IIoTService ioTService)
 {
     _db          = db;
     _userService = userService;
     _mapper      = mapper;
     _ioTService  = ioTService;
 }
        public UserService(IHttpContextAccessor httpContextAccessor, SurveillanceContext db, IMapper mapper)
        {
            HttpContext = httpContextAccessor.HttpContext;
            _db         = db;
            _mapper     = mapper;

            if (HttpContext != null)
            {
                User = HttpContext.User;
            }
        }