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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:27:06+00:00 2026-06-01T09:27:06+00:00

I have table with Names such as JS Engineering Services$Web User Setup Header and

  • 0

I have table with Names such as

JS Engineering Services$Web User Setup Header and
Sachin Sales & Service Pvt Ltd$Web User Setup Header

how do i map these tables with Ado.net Entity framework POCO Code first approach ? The table structures are the same . I have done POCO with Single Table names and Schema as Dbo just declaring table like

Web User Setup.

Also alongwith it I would like to ask That how to Create tables like Names with spaces. Something like above as i have mentioned . If we want to Create Table names with Spaces How to do it dynamically to generate a table name as

Sachin Sales & Service Pvt Ltd$Web User Setup Header

using Ado.net Entity framework in Codefirst approach ?

Previously i used Nhibernate so shifted recently to Ado.net Entity framework . Liked the Fluent configuration in Ado.net Codefirst approach . Can someone guide me with the above mentioned scenario how to approach it ? Any dummy properties would be welcome . It doesnt matter . I jsut want to generate the table names dynamically Based on the fact the both scemas contain exactly same columns

  • 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-06-01T09:27:07+00:00Added an answer on June 1, 2026 at 9:27 am

    …not sure if this is what you’re looking for, but there are two things to address here seems:

    The table naming, have you tried the following…
    (from your : DbContext implementation class, method protected override void OnModelCreating(DbModelBuilder modelBuilder))

    modelBuilder.Entity<JSEngineeringServicesWebUser>()
        .ToTable("JS Engineering Services$Web User");
    

    (note: you may need to experiment with this, I haven’t worked w/ such names and don’t have it handy to test, try fast)

    another options is using [Table("JS Engineering Services$Web User")] as an attribute on your entity class. (note: I personally prefer the fluid methods as it give you more control (for other things, keys, relationships) and it’s not often working well when ‘mixing’ the two)

    …or take a look at this, similar question Can I change the default schema name in entity framework 4.3 code-first?

    And 2nd problem is the fact the tables may be ‘temp tables’. That’s a bit tricky to achieve. But if you have them in the Db (just look and work as temp tables) then you can go ahead and just map like any other entity.

    If you need to create and tear-down dynamically – then consider this post here, with something similar…

    Cache table with Entity Framework 4

    EDIT: from comments below, to update…

    If the ‘temp’ tables are always the same like you say it is –

    Then you should be ok with what’s in Cache table with Entity Framework 4 – create a model to match the table model, or even you might need to create one table like that (to always be there, I’m not sure if code-first might complain if nothing to match at start, or to run with ‘use the existing db’ w/o checking), and use ‘straight’ SQL to run a query (from context class, like explained in the link) – and then list the output to that model class. And it might just work:)

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

Sidebar

Related Questions

I have a table of artist names such as Lady Gaga, Jason Mraz, Death
I have 3 tables in my database, for example with such names: TableA, TableB,
I have table with 50 entries (users with such details like Name Surname Location
i have such mysql db table: id name surname number 1 emil asadi 26
If I have a table such as: info_name | info_value name | Susan desc
Lets say I have a table with columns such as: ID Name City State
I have a contacts table which contains fields such as postcode , first name
I have a table of names and addresses, which includes a postcode column. I
Assuming you have the following database table: create table Names ( Id INT IDENTITY
I have a table City which contains city names, and I have a another

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.