My questions is: I have an enum class as:
public enum EnumApplications
{
Android = 1,
IOS = 2
}
Also I have a Model which is for Creating a new user. a user can be defined as Active in any of these application when we create a new user.
My model is:
public class NewUserModel
{
public int UserId { get; set; }
[Required]
[Display(Name = "FirstName")]
public string FirstName { get; set; }
[Required]
[Display(Name = "LastName")]
public string LastName { get; set; }
public int ClientId { get; set; }
[Required]
[Display(Name = "Email")]
[EmailAddress]
public string EmailAddress { get; set; }
[Display(Name = "Is Active in IOS")]
public bool IsActiveInApp1 { get; set; }
[Display(Name = "Is Active in Android")]
public bool IsActiveInApp2 { get; set; }
}
What I want to do is in the: [Display(Name = "Is Active in Android")]
I want to use the enum so if the app name gets changed I don't need to change it here, something like:
EnumApplications.IOS.ToString()
Here's a screenshot for better understanding: