Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6241563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:47:26+00:00 2026-05-24T11:47:26+00:00

In my database I want to save the user GUI settings for one of

  • 0

In my database I want to save the user GUI settings for one of the “views”, as a semicolon-separated string, i.e. : “1;31;5;411;”.

I use NNibernate for this project, and this is the mapping and the code for this specific private member;

C# entity code for User.Settings

private string _linkConsole = "0";

[DataMember]
public LinkConsole LinkConsole
{
    get { return new LinkConsole(_linkConsole); }
    set { _linkConsole = value.GetSqlString(); }
}

XML mapping:

<property name="LinkConsole" type="System.String" access="field.camelcase-underscore" not-null="true"/>

LinkConsole has a lot of public methods for GUI-specific settings, which is toggling the values of certain private members.

When its time to save this settings to the database, .GetSqlString(); formats the string and writes it to the private member _linkConsole , which is the private member exposed to NHibernate & the database.

Problem:

When I try to do something with the GUI, i.e.:

User.Settings.LinkConsole.SetRightPaneContent(50);

This is never stored on the object LinkConsole, and I can’t seem to figure out why?
When I set a breakpoint, I get a message in Visual Studio stating:

Your step-into request resulted in an automatic step-over of a property or operator

Maybe this is a result of the problem, that I’m designing this in a wrong way?
If so, is it possible to achieve this in combination with a private string member?

Any help would be greatly appreciated! Thanks! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:47:26+00:00Added an answer on May 24, 2026 at 11:47 am

    This isn’t really an NHibernate issue. LinkConsole is a reference type. If you set a member of it, it isn’t going to call the set method on the property you got it from, it’s going to set the value on the instance that was returned from the original get. If you want this code to work, you’d need to get a new LinkConsole instance from the User, call the methods to set the settings, then set the LinkConsole property of the user to your configured instance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to save a query only one time in the database, this is
I want to save a user's IP address to my database just in case
When a user logs in I want to save their IP in the database.
If you use a database to store users you could save user info as
I want to save session in database.in CodeIgniter user guide , make an example
I want to save user image into a database in C#. How do I
i want to save current date+time into database and also want to retrieve it.
I want to save Image in Database with JSON web service .without image data
I want to save my countries local time(new zealand) in my database. I am
I want to save a pdf and mp3 file(s) to a SQL Server database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.