asp.net mvc - Accessing entities model from other project in same solution -
i have mvc web project , other project have entities "database first" entity approach. referenced entities project web project seen on image below
structure: http://i.imgur.com/h5zppig.png
now created simple controller automatic crud operations.
the error still complaining not having entities referenced: http://i.imgur.com/1javqr9.png
this how type implemented in view:
@model ienumerable<entities.users>
what seems problem?
you need register assembly razor view engine.
you can put in web.config exists in views folder.
<system.web> <controls> <add assembly="system.web.mvc, version=3.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" namespace="system.web.mvc" tagprefix="mvc" /> <add yourassembly here /> </controls> </system.web>
Comments
Post a Comment