// GET: Dashboard/CreateProfile
        public ActionResult CreateProfile()
        {
            var userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier);
            var owner  = uow.GetPortofolioByUser(new Guid(userId));

            if (owner != null)
            {
                return(RedirectToAction("EditProfile"));
            }
            return(View());
        }
        public IActionResult Index(Guid?id)
        {
            var   userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier);
            Owner Owner  = null;

            if (id != null)
            {
                Owner = _uow.GetPortofolio(id);
            }
            else
            {
                if (userId != "" && userId != null)
                {
                    Owner = _uow.GetPortofolioByUser(new Guid(userId));
                }
            }
            if (Owner == null)
            {
                Owner = _uow.OwnerRepository.GetDefaultOwner();//.GetFirstOwnerWithAddress();
            }
            var portofolioItems = _uow.PortofolioItemRepository.GetAllPortofolioItemsForOwner(Owner.Id);

            var ViewModel = new PortofolioViewModel
            {
                Owner           = Owner,
                portofolioItems = portofolioItems,
                AppTitle        = "My Portofolio"
            };

            return(View(ViewModel));
        }