2
Reply

Adding view in MVC giving error

PRASAD GODBOLE

PRASAD GODBOLE

Nov 9 2015 4:03 AM
752
Hi All,

I am developing sample MVC application by selecting empty MVC project and trying to add view via controller. While adding view I am getting error.

I am using VS 2015, .NET Framework 4.5 and Entityframework.dll

Code is attached. Please have a look.

While adding view if I set the Template as "Empty (without model)", its allowing me to add the view but when I am setting the Template as "Details" and set Model Class as "UserLogin (SampleMVCWork.Models)",
Data context class as "AppEntitiesDBContext (SampleMVCWork.Models)"
then its throwing error "There was an error running the selected code generator" 'Object reference not set to an instance of an object'"

Can anyone please advice that what I am doing wrong here?

Thanks and Regards
Prasad


Attachment: attached code.zip

Answers (2)