Using Repository and Unit of Work patterns with Entity Framework 4.0 and MVC 2
Posted
by Mr. D
on Stack Overflow
See other posts from Stack Overflow
or by Mr. D
Published on 2010-04-02T16:01:46Z
Indexed on
2010/04/06
3:33 UTC
Read the original article
Hit count: 700
Hi, I'm following this article Using Repository and Unit of Work patterns with Entity Framework 4.0. I'm tying to implement the Repository and Unit of work pattern, using Asp.Net MVC 2 and Entity Framework 4.
Please let me know if I'm doing it right...
In the Models folder:
Northwind.edmx
Products.cs (POCO class)
ProductRepository.cs (Did my product query)
IProductRepository.cs
NorthwindContext.cs
IUnitOfWork.cs
In the Controller folder:
ProductController.cs (Retrieve from ProductRepository.cs and Pass it to the view)
When I run the application, I'm getting error message:
Mapping and metadata information could not be found for EntityType 'NorthwindMvcPoco.Models.Category'.
I don't know what I'm doing wrong. I search through whole web and I couldn't resolve this issue. Please help me.
© Stack Overflow or respective owner