예제 #1
0
        public async Task <IActionResult> Post(int id)
        {
            if (id != 0)
            {
                Post post = postContext.GetById(id);

                if (User.Identity.Name != null)
                {
                    Gebruiker huidigeGebruiker = await gebruikerContext.GetByNaam(User.Identity.Name);

                    postContext.RecordCategoryVisit(post.Categorie, huidigeGebruiker);
                }

                return(View(post));
            }
            return(View(null));
        }
예제 #2
0
 public void RecordCategoryVisit(Categorieën categorie, Gebruiker gebruiker)
 {
     context.RecordCategoryVisit(categorie, gebruiker);
 }