none
how can i get that GetDatabaseValues? RRS feed

  • Question

  • hi guys~

     

    i want to get to GetDatabaseValues on EF4.2 CodeFirst.

     

    PrintValues3(context.Entry<PersonSet>(p).GetDatabaseValues());

    and it is my error message.

     

    An unhandled exception of type 'System.Data.EntitySqlException' occurred in System.Data.Entity.dll

    Additional information: Type 'PersonModel.PersonSet' could not be found. Make sure that the required schemas are loaded and that the namespaces are imported correctly. Near type name, line 1, column 121.

     

     

    Thursday, August 11, 2011 5:09 AM

Answers

  • Hello,

    Thank you for posting.

    From you description and error information, first please check if the namespace which includes Entries or DbSets was imported into project. If not, please put them into the same namespace and try it again.

    If I misunderstood, please feel free to let me know.

    Thanks,


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, August 15, 2011 5:44 AM
  • Thank you bro~>

     

    i solve the problem. thank you.

     

    i changed to namespace . i was misstake that namespace .~~

    Tuesday, August 16, 2011 12:25 PM

All replies

  • Hello,

    Thank you for posting.

    From you description and error information, first please check if the namespace which includes Entries or DbSets was imported into project. If not, please put them into the same namespace and try it again.

    If I misunderstood, please feel free to let me know.

    Thanks,


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, August 15, 2011 5:44 AM
  • Thank you bro~>

     

    i solve the problem. thank you.

     

    i changed to namespace . i was misstake that namespace .~~

    Tuesday, August 16, 2011 12:25 PM
  • Glad to hear it helps. Please feel free to let us know if you have any question later.

    Thanks,


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, August 16, 2011 1:33 PM