views:

23

answers:

0

I am going to have a application configuration table, something like this.

    public virtual int id { get; set; }
    public virtual bool CommentsActive { get; set; }
    public virtual bool UploadByPublicUser { get; set; }
    public virtual bool UploadPicturesByPublicUser { get; set; }

Now this table only gone have one row and it's gone be updated all the time(that single row). I wonder if I am doing this wrong cause I am thinking about doing this like this.

var appConfig = ObjectFactory.GetInstance<IAppConfigService>.Get().SingelOrDefault();

And then I only use the SaveOrUpdate().

Is this the right approach for this or am i totally wrong? I hope you get my question and thoughts around this.