Created
December 29, 2025 21:12
-
-
Save sunmeat/1191a5eda3d09d4848cbdd58d168c15e to your computer and use it in GitHub Desktop.
model + localization
This file contains hidden or 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
| using mvc.Resources; | |
| using System.ComponentModel.DataAnnotations; | |
| namespace mvc | |
| { | |
| public class Student | |
| { | |
| public int Id { get; set; } | |
| [Display(ResourceType = typeof(SharedResources), Name = nameof(SharedResources.Name))] // !!! | |
| public string? Name { get; set; } | |
| [Display(ResourceType = typeof(SharedResources), Name = nameof(SharedResources.Surname))] | |
| public string? Surname { get; set; } | |
| [Display(ResourceType = typeof(SharedResources), Name = nameof(SharedResources.Age))] | |
| public int Age { get; set; } | |
| [Display(ResourceType = typeof(SharedResources), Name = nameof(SharedResources.GPA))] | |
| public double GPA { get; set; } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment