none
Numbers as Column names RRS feed

  • Question

  • I've added a new table to my database with the column names like 0, 20, 30, 40 etc.  When I update the model from the database EF prefixes the column names with a C - C0, C20, C30, C40 etc.  

    I guess it doesn't really matter if it maps back to the database since this will be a read only table.  Just wondering why it does this automatically?

    TIA

    Harry

    Monday, October 14, 2019 4:41 PM

Answers

  • I've added a new table to my database with the column names like 0, 20, 30, 40 etc.  When I update the model from the database EF prefixes the column names with a C - C0, C20, C30, C40 etc.  

    I guess it doesn't really matter if it maps back to the database since this will be a read only table.  Just wondering why it does this automatically?

    TIA

    Harry

    You can't even start a variable name with a number or a method name, let alone a property name of an object  try it
    • Marked as answer by Mimosa Arts Tuesday, October 15, 2019 12:23 PM
    Monday, October 14, 2019 7:10 PM

All replies

  • I've added a new table to my database with the column names like 0, 20, 30, 40 etc.  When I update the model from the database EF prefixes the column names with a C - C0, C20, C30, C40 etc.  

    I guess it doesn't really matter if it maps back to the database since this will be a read only table.  Just wondering why it does this automatically?

    TIA

    Harry

    You can't even start a variable name with a number or a method name, let alone a property name of an object  try it
    • Marked as answer by Mimosa Arts Tuesday, October 15, 2019 12:23 PM
    Monday, October 14, 2019 7:10 PM
  • I felt weird when I did the table but those were the column headings.  Will the C110 map back to my 110 column I wonder.  I imported this from an Excel ss.
    Tuesday, October 15, 2019 12:25 PM
  • I felt weird when I did the table but those were the column headings.  Will the C110 map back to my 110 column I wonder.  I imported this from an Excel ss.
    No, it shouldn't be a problem.
    Tuesday, October 15, 2019 6:34 PM