HashTable或App.config? [英] HashTable or App.config?

查看:87
本文介绍了HashTable或App.config?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的SQL Server的paramTable中有很多参数,我需要在用户登录时读取这些参数,并将其保留在该参数中,然后在注销时将其删除,或者在同一台计算机上再次使用login时将其保留并替换它..

哪种方法最好?保存在HashTable中?或保存在App.config中?


Jassim Rahma

I have lot of parameters in my paramTable in my SQL server and I need to read those parameters when the user login and keep it there then delete it when logout or just leave it and replace it when use login again on the same machine..

which way is best to do it? saving in in HashTable? or save in the App.config?


Jassim Rahma

推荐答案

Jassim

Hi Jassim,

将数据从数据库保存到App.confing是一种不好的方法.如果您需要在内存缓存中一直使用的数据始终存在,则可以是HashTable或任何其他对象.

Saving data from database to App.confing is a bad approach. If you need data present all the time you should use in memory caching, be it HashTable or any other object.


这篇关于HashTable或App.config?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆