I'm creating an MVC ASP.NET Core 3.1 Web application, and in the middle of the project I added the following properties and annotations to the ApplicationUser class.
[Display(Name = "First Name")]
[StringLength(100, ErrorMessage = "The {0} can't have more than 100 characters.")]
public string FirstName { get; set; }
[Display(Name = "Last Name")]
[StringLength(100, ErrorMessage = "The {0} can't have more than 100 characters.")]
public string LastName { get; set; }
[Display(Name = "Date Of Birth")]
public DateTime DateOfBirth { get; set; }
public string Country { get; set; }
However, I accidentally run add-migration and update-database before adding another annotation to DateOfBirth:
[DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}", ApplyFormatInEditMode = true)]
What is the way to correct the mistake? How can I add the annotation now? Thank you.