Hello,
I have been trying to use Entity Framework with a Validator and a
Mapper projects in MVC and I have huge problems.
I am considering move everything to NHibernate.
Before that could someone, please, clarify me on the following?
1. I need to create a Context with its Entities and Relationships from
a SQL Database.
I have One to Many and Many to Many relationships.
2. I need to implement Unit of Work and Repository pattern on those
Entities.
3. I need to map the Entities to Models (and vice versa) that are more
appropriated to the MVC project.
For example, map:
public class DocumentCreate {
public String Title { get; set; }
public HttpPostedFileBase File { get; set; }
public String LevelId { get; set; }
public List<Int32> SubjectsIds { get; set; }
}
To an Entity Document where:
String Title > String Title
HttpPostedFileBase File > Byte[] File
String LevelId > This is the Id of a Level to be associated to a
Document (1 to 1 Relationship)
List<Int32> SubjectsIds > This contains the SubjectsIds that
should be related to the Document (1 to * Rel)
4. Need to validate DocumentCreate
I need to validate DocumentCreate with Fluent Validation before
the map to Document Entity occurs.
I have a lot of problems with EF and the two open source projects so I
hope someone can give me some feedback on this to decide if I move to
NHibernate tools or not.
Thank You,
Miguel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---