J
Jeremy
I am relativly new to ASP.NET, and my question is this:
Is it better to create a wrapper class that contains all the running
settings for the application and then load that into the app state, or is it
better to load the scalar variables and store them individually?
In case I'm not making my self clear, is it better to do this:
'// Load each variable individually
Context.Cache.Add( "UserFirstName", txtFirstName.Text ... )
Context.Cache.Add( "UserLastName", txtLastName.Text ... )
or this:
'// Store vars in a class, and then cache the class
Config.ActiveUser.FirstName = txtFirstName.Text
Config.ActiveUser.LastName = txtLastName.Text
Context.Cache.Add( "Config", Config ... )
?
Thanks,
Jeremy
Is it better to create a wrapper class that contains all the running
settings for the application and then load that into the app state, or is it
better to load the scalar variables and store them individually?
In case I'm not making my self clear, is it better to do this:
'// Load each variable individually
Context.Cache.Add( "UserFirstName", txtFirstName.Text ... )
Context.Cache.Add( "UserLastName", txtLastName.Text ... )
or this:
'// Store vars in a class, and then cache the class
Config.ActiveUser.FirstName = txtFirstName.Text
Config.ActiveUser.LastName = txtLastName.Text
Context.Cache.Add( "Config", Config ... )
?
Thanks,
Jeremy