Exemplo n.º 1
0
        public ActionResult GetRecomendation(int assemblyId)
        {
            var computerAssembly = _computerAssemblyService.GetComputerAssembly(assemblyId);

            if (computerAssembly == null)
            {
                return(NotFound());
            }
            var userId = _userService.GetApplicationUserManager().GetUserId(this.User);

            if (computerAssembly.OwnerId != userId)
            {
                return(Forbid());
            }
            var result = _computerAssemblyService.CreateRecomendations(computerAssembly);

            return(PartialView("Recomendation", result));
        }