© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
21 replies
Messiah

❔ Razor pages view

In this snippet
 @foreach (var cafe in Model.CompanyCafes)
    {        
        @await Html.PartialAsync("Cafe", cafe, new ViewDataDictionary(this.ViewData) { { "ShowImage", true } });        
    }
 @foreach (var cafe in Model.CompanyCafes)
    {        
        @await Html.PartialAsync("Cafe", cafe, new ViewDataDictionary(this.ViewData) { { "ShowImage", true } });        
    }

Where does razor pull the Model.CompanyCafes from? The MS docs regarding model binding is a bit confusing as it assumes I know a lot beforehand
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

EF Core Razor Pages and an MSSQL View
C#CC# / help
4y ago
❔ Razor pages redirect
C#CC# / help
4y ago
MVC vs Razor Pages
C#CC# / help
13mo ago