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

  • Home
  • SEARCH
  • 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 739209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:22:25+00:00 2026-05-14T08:22:25+00:00

I am trying to access the MYSQL database tables to create a GUI for

  • 0

I am trying to access the “MYSQL” database tables to create a GUI for adding users and privileges.

Doing this, I have run into my first NHibernate problem. How do i map MySQL Enum’s to a C# Boolean? Or if not possible then to at least a Enum?

The database fields are delcared as

enum('N', 'Y')

These are all of the privilege fields in the database.

Now is there anyway of getting this into an enum or even better, boolean in C#/NHibernate?

Edit #1: In C# if I need to declare an enum it will be the following:

enum YesNoEnum
{
  Yes,
  No
}
  • 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-14T08:22:26+00:00Added an answer on May 14, 2026 at 8:22 am

    You can use a bool in C# and map it to a char in MySQL using a custom IUserType implementation. This example is exactly what you’re looking for.

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

Sidebar

Related Questions

I am trying to import an access database to mysql. I have created a
I am using Access 2007 and have some linked tables to a mySQL database.
I'm trying to use Sequel to access a MySQL database in Ruby. When I
I have a webapp written in PHP using a MySQL database backend. This question
I have a MySQL database with 21M records and I'm trying to do an
I am having a few issues when people are trying to access a MySQL
I am trying to access Outlook 2007 from C#. I have installed the PIA
I have a MySQL DB with a user that has access only a few
I need to create an entity relationship diagram for a MySQL database. It doesn't
I am using joomla 1.0.13 and i am trying to access JACLplus but this

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.