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)); }
public void RecordCategoryVisit(Categorieën categorie, Gebruiker gebruiker) { context.RecordCategoryVisit(categorie, gebruiker); }