public IActionResult Index(int id)
        {
            var prodCtor = new DtoConstructor(_uow);

            var model = prodCtor.GetProductDtoByProductId(id);

            var x = model;

            return(View(model));
        }
Пример #2
0
        public async Task <IActionResult> Index()
        {
            var user = await _userManager.GetUserAsync(HttpContext.User);

            var userId = user.Id;

            var prodCtor = new DtoConstructor(_uow);

            var model = prodCtor.UserDtoByCustomerId(userId);

            return(View(model));
        }
Пример #3
0
        public IActionResult Index(/*int amount=10, int frontAmount = 3*/)
        {
            try
            {
                var homeCtor = new DtoConstructor(_uow);

                var model = homeCtor.GetHomeDto(10, 3);

                var x = model;
                // throw new NullReferenceException("Just testing dude");
                return(View(model));
            }
            catch (Exception e)
            {
                _logger.LogError(e.ToString());
                return(View("ErrorProduction"));
            }
        }