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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:41:42+00:00 2026-05-24T21:41:42+00:00

Inside my app entity is identified by a string key – a baseN representation

  • 0

Inside my app entity is identified by a string key – a baseN representation of its ID like
xAdWzC which is a BaseN (52) representation of numeric Id.

numeric Id is generated using similar to oracle sequence algorithm, before insertion ( my custom id generator).

How do I map my class that basicly has 2 representations of Id to be saved in db with 2 columns one numeric – primary key and the other – a string key to identify rows in db better? I obviously dont need 2 primary keys and would prefer numeric PK.

A string key is just a property that wraps around numeric key in C# like this

public string Key
{
     get { return BaseNFunction(Id); }
}

Basicly I want this mapping to be one way to db. When item is loaded from db this column has to be completely ignored.

How would the NHB mapping look like?
Is the question difficult or its just wasn’t spotted? I dont think its worth a bounty but please help me.

  • 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-24T21:41:43+00:00Added an answer on May 24, 2026 at 9:41 pm

    Just make the generated property readonly (it’s access="readonly" in XML; look for something similar in fluent)

    Read-only in this case means the property is read from the entity and written to the DB, but not the other way around

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

Sidebar

Related Questions

I'm using Entity Framework 4 for a simple app and would like to bake
I'm using Entity Framework inside a DLL. VS creates a app.config, but when I
I'm making an Android app, which gets its information from XML files. I'm filling
I am trying to install an app inside of another web app. I have
I try to create 2 buttons inside my app case WM_CREATE:{ hWnd =CreateWindowEx(NULL, LBUTTON,
I want to be able to use the iPhones Mail.app inside my application so
Hi am trying to pass variables to php from inside an app. <?php //
I have a directory called cron, inside my app directory. In the cron directory,
How do I accept credit card payments inside a C# app? I'll use some
Has anyone every embeded the iPhone's Email program inside your own App? Let me

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.