I'm using Chris Hammond DNN module template to learn about DNN MVC module. I added another property in Settings class called Display and it is saved as "MessageList_Display" in the database and I get see the Display's value in Module's settings as well but How do I access this settings value?
I have a Model class called "MessagesViewModel.cs" and I have property called Message.
public string Message
{
get
{
var settings = new Settings();
if (settings.Display != null)
{
return settings.Display;
}
return string.Empty;
}
}
The Settings's Display is null while Setting1 and Setting2 both have value. How do you access settings in DNN MVC module?