This project is read-only.

Chapter 4 Please Help me!

Aug 8, 2014 at 8:11 PM
I am getting an error on chapter 4. I know that others have had trouble with the same section. The error message is
An exception of type 'System.Data.Entity.ModelConfiguration.ModelValidationException' occurred in EntityFramework.dll but was not handled in user code
Additional information: One or more validation errors were detected during model generation:

\tSystem.Data.Entity.Edm.EdmEntityType: : EntityType 'Genre' has no key defined. Define the key for this EntityType.
\tSystem.Data.Entity.Edm.EdmEntitySet: EntityType: EntitySet 'Genres' is based on type 'Genre' that has no keys defined.
This is the method:
public ActionResult Index()
        var genres = storeDB.Genres.ToList();
        return View(genres);
I am running Visual Studio Express 2013 and I have downloaded SQL Compact Edition 4. Maybe I haven't installed it correctly? Maybe....?

I am beyond frustrated and I have seen that others have had this problem but I can't figure out what they did to resolve this issue. PLEASE HELP ME!!!!!

Thank you kindly