locked
Re:Type 'Int32' is not a valid entity type. RRS feed

  • Question

  • User-606490918 posted

    Hi

    I have been trying to pull a database table with a small int field into my dbml file, the entity type rendered itself as a short initially, and I got the following error message:

    Type 'Int16' is not a valid entity type.  Entity types cannot be a primitive type or a simple type like string or Guid.

     

    Then i converted the memeber type to a int instead of the short and i ran into the following error:

     Type 'Int32' is not a valid entity type.  Entity types cannot be a primitive type or a simple type like string or Guid.  

     

    I am just not able to get around the issue, can anyone please give in some constructive feedback as to why is that possibly happening?

    Thursday, September 23, 2010 11:44 AM

All replies

  • User-341994687 posted

    I think it is because those data types can be nullable and the database will not allow them.  Can you not insert an int type? You can use validation to ensure the data entered is correct.  

    Thursday, September 23, 2010 2:50 PM
  • User-606490918 posted

    Hi

    I didnt go that far as inserting data into the column I am still struck with the trying to have a successful build, I tried to change the column typt to a nullable column, yet the error still persists?


    Monday, September 27, 2010 10:45 AM
  • User1716267170 posted

    Hi rishi23,

    What is your entity class? Can you show us more details?

    Thanks. 

    Tuesday, September 28, 2010 3:22 AM