I have a dotnet core application. I added model class everytime with fixed prefix. It goes very lengthy and unhandled way. Is there any better way to handle this?
public class Category
{
public string? gmailIN{ get; set; }
public string? aolIN{ get; set; }
public string? outlookIN{ get; set; }
public string? yahooIN{ get; set; }
public string? hotmailIN{ get; set; }
public string? ZohoIN; set; }
public string? aolAU{ get; set; }
public string? outlookAU{ get; set; }
public string? yahooAU{ get; set; }
public string? hotmailAU{ get; set; }
public string? ZohoAU{get; set; }
public string? gmailAU{ get; set; }
public string? aolUK{ get; set; }
public string? outlookUK{ get; set; }
public string? yahooUK{ get; set; }
public string? hotmailUK{ get; set; }
public string? ZohoUK{get; set; }
public string? gmailUK{ get; set; }
public string? gmailUS{ get; set; }
public string? aolUS{ get; set; }
public string? outlookUS{ get; set; }
public string? yahooUS{ get; set; }
public string? hotmailUS{ get; set; }
public string? ZohoU{get; set; }
}
Prefix is always the same. Is there any better way to add variables instead of adding above way?