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

            Assert.IsNotNull(proxy);

            proxy.Add("", "");
            proxy.Record(null);
        }
コード例 #2
0
        public IActionResult Add(AddCameraViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            model.UserId = userManager.GetUserId(User);

            cameraService.Add(model);

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