public void Create(CameraAddModel addCameraModel, string userId)
        {
            var camera = this.mapper.Map <Camera>(addCameraModel);

            camera.UserId = userId;

            this.db.Add(camera);
            this.db.SaveChanges();
        }
        public IActionResult Add(CameraAddModel addCameraModel)
        {
            if (!ModelState.IsValid)
            {
                return(RedirectToAction(nameof(Add)));
            }

            var userId = HttpContext.User.FindFirstValue(ClaimTypes.NameIdentifier);

            this.cameras.Create(addCameraModel, userId);

            return(RedirectToAction(nameof(All)));
        }