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 6147133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:03:38+00:00 2026-05-23T19:03:38+00:00

i am working on a legacy oracle database that uses character literals T and

  • 0

i am working on a legacy oracle database that uses character literals T and F in the database for its boolean values however i would like the Entity property to reflect a proper boolen value is there a wy to convert this value when the model is binding it is a read only database so inserts are not important

  • 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-23T19:03:39+00:00Added an answer on May 23, 2026 at 7:03 pm

    I would suggest wrapping up or extending the generating type to add this sort of functionality …

    entity framework will generate objects that basically match what the data in the database tables looks like so if you have a table called “Contacts” you’ll get an object called “Contacts”, I think (although i could be wrong) the classes are defined as partial so it generates something like …

    public partial class Contact { 
      string BoolReally { 
        get; set;
      };
    }
    

    you then add a new property like this …

    public partial class Contact { 
      bool MyBool get { 
        return (legacyValue == "T") ? true : false;
      }
    }
    

    Now when you declare a Contact instance just fish the value from “MyBool” instead.

    …

    That’s extending, wrapping up would be something like this …

    public class MyContact {
         public Contact Contact;
         public bool MyBool { 
             get { 
                 return Contact.BoolAsString; 
             }
         }
    }
    

    similar thing … just need to consume the object slightly differently 🙂

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

Sidebar

Related Questions

I'm working with a legacy database that stores a boolean column as a string,
I'm working on a legacy system that has uses stored procs, business objects and
I'm working on a legacy database table that has a phone no. field but
Im working on a legacy oracle database with a slightly odd table naming convention
I am a .Net web developer working with a legacy Oracle database. In the
Im working on a legacy database, that cant be changed. I have a table
I'm working with legacy code that uses some convoluted logic to bind IN and
I'm working with a legacy database in Oracle and some of my tables have
I am working on a legacy jsp web application that uses JDBC and inline
I am working with an oracle legacy database. All the dates are saved in

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.