TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mark Tabor
589
2k
460.2k
Model binding with index view in mvc
Oct 17 2019 3:47 AM
Hi i have a simple question , I have a class with name Registration in which i have 8 properties and all are quired fields , not this model is binded to the view and it works fine , Now the issue is i want to have the same model bind to another view but on another view i just have four properties and when i tried to bind the existing model with this new view it gives validation error and in my model class i have 8 propertise and all are required but in this view i need just four so what to do in this case , if i need to create a seperate model then how do link this new model with previous one .
{ BECAUSE both model are using same Registration table } it gives this error
The entity types 'Registration' and 'UserModelForActivation' cannot share table 'Registrations' because they are not in the same type hierarchy or do not have a valid one to one foreign key relationship with matching primary keys between them.
both medoel are decorated with [Table("Registration")]
Reply
Answers (
3
)
Issue with DropDownlist in asp.net core mvc
Gridview paging issue