Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

SettingsManager #574


User avatar
0
nikko1337 created

Hello Guys!

I've been reading about ASP.NET Boilerplate in the past few weeks and it's an amazing framework but I fail to understand how to use SettingsManager for Users. I mean how do I decide if I should put something from Users table in the settings manager? To make it more clear if you look at the example in the documentation we have "SiteColorPreference". How do I know or what makes you decide if it goes on Users table or SettingsManager?

Thank you.


2 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    This is completely your design. For me, SiteColorPreference is a setting rather than a user entity's property. Because, SiteColorPreference can be default value for user's tenant or application (which setting manager handles). Also, setting system is more flexible in some cases (a code can read/write it without tightly coupled to User entity or User repository).

    If a setting is just a user-level setting and you want to use this property in queries (SQL or LINQ) then entity property would be better. So, do not use settings for natural User properties (like user name and birth date).

  • User Avatar
    0
    nikko1337 created

    Thank you!