-
-
Save csharpfritz/c6c4c8ffcc2ad443c5fea3231f1194ea to your computer and use it in GitHub Desktop.
RazorPage PageModel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MyFirstRazorPage.Pages | |
{ | |
public class NowModel : PageModel | |
{ | |
private IFileProvider _FileProvider; | |
public NowModel(PhysicalFileProvider fileProvider) | |
{ | |
_FileProvider = fileProvider; | |
LastModified = _FileProvider.GetFileInfo("Pages/Now.cshtml").LastModified.LocalDateTime; | |
} | |
public DateTime LastModified { get; set; } | |
public void OnGet() { } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment