Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hi there,

I have a problem where I am using entity framework to update and create a Music table. I have a testing project where i built the entity using a builder class called MusicBulider. The builder class inherits the Music model.

When I try and create the class and update via EF, I get an error as the EF cannot handle the builder class.

Is there a way where I can cast the Builder class into the Object that I want to update? Everytime I try and run my test I get the following error.

An exception of type 'system.InvalidOperationException' occured in EntityFramework.dll but was not handled in user code.

Additional information: Mapping and metadata information could not be found for entity type 'TestRate.Tests.MusicBuilder'

I hope I have given enough information.

Thanks in advance.
Posted
Comments
Maciej Los 23-Mar-14 18:20pm    
Do not expect an answer without detailed question. We need at least the part of code and the information about the line which produecs above error.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900