displayname attribute in model in asp net core code example Example: asp.net model display name [DisplayName("foo")] public string MyProperty { get; set; }