none
The type 'Employee' is not attributed with EdmEntityTypeAttribute but is contained in an assembly attributed with EdmSchemaAttribute .. RRS feed

  • Question

  • The type 'Employee' is not attributed with EdmEntityTypeAttribute but is contained in an assembly attributed with EdmSchemaAttribute. POCO entities that do not use EdmEntityTypeAttribute cannot be contained in the same assembly as non-POCO entities that use EdmEntityTypeAttribute.

    Everything was working fine until I had to update the FK relationships in the DB. After that I tried to update the model in Visual Studio using the Delete and Refresh options. This didn't work well for table columns that had been renamed. They were not refreshed in the model and so I deleted the .edmx and regenerated the model. I then started getting this error. I have built clean and looked around to see if anyone has ran into this and solved it but not getting much information yet on it.

     

    Wednesday, November 30, 2011 1:38 AM

Answers

  • This went away after a second attempt of recreating the model after REALLY cleaning out the model project.  I think there were some naming conflicts in the process of regenerating the model the first time as I may have unintentionally changed the namespace name.

    Thanks.

    Tuesday, December 6, 2011 3:46 AM

All replies

  • Hi,

    The Employee class, what relation does this have with your Entity Model?

    Is it a part of the model? Do you have several classes in your assembly with the name Employee?

    Do you use the Employee class in any special circumstances with EF?


    --Rune

    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful" if the post helped you to a solution of your problem.
    Thursday, December 1, 2011 7:37 AM
  • Hi,

    I am writing to check the status of the issue on your side.  Would you mind letting us know the result of the suggestions?

    If you need further assistance, please feel free to let me know.   I will be more than happy to be of assistance.

    Have a nice day.


    Alan Chen[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, December 6, 2011 2:52 AM
    Moderator
  • This went away after a second attempt of recreating the model after REALLY cleaning out the model project.  I think there were some naming conflicts in the process of regenerating the model the first time as I may have unintentionally changed the namespace name.

    Thanks.

    Tuesday, December 6, 2011 3:46 AM
  • This problem arise to me after the installation VS2012 Update 4.

    I added a table to an existing EDMX.
    No errors before the last update.


    It seems that the .edmx file is ok with the new table but the corresponding .tt files remain in the previous state.

    The total cleaning (deleting all files: .edmx and .tt) and the rebuild of the model, have solved the error.

    Thanks for the input.

    Sunday, November 17, 2013 6:39 PM