Example #1
0
        public void InterfaceInheritance()
        {
            ICameraService proxy = (ICameraService)
                                   generator.CreateInterfaceProxyWithTarget(typeof(ICameraService),
                                                                            new CameraService(),
                                                                            new StandardInterceptor());

            Assert.IsNotNull(proxy);

            proxy.Add("", "");
            proxy.Record(null);
        }
        public IActionResult Add(AddCameraViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            model.UserId = userManager.GetUserId(User);

            cameraService.Add(model);

            return(RedirectToAction("/home"));
        }