vs2010 + MVC 2 + unable to create view
HI,
I was wondering if any one else had had a problem with VS2010 MVC 2 projects not being able to automaticly create a strongly typed view after doing a fluent mapping?
When trying to do the mapping VS2010 doesnt show the Entities in the drop down and even if i manually put the class in it doent build the view correctly.
Cheers
Dan
Support Staff 2 Posted by Paul Batum on 25 Sep, 2010 10:02 PM
Sorry I can't offer any assistance in solving your actual problem, but I
just wanted to mention that in a MVC application you should really think
about using view models rather than binding your view directly to your
domain objects. This extra layer of separation gives you a way to reduce the
amount of logic in your views and address other presentation concerns
without modifying your domain objects.
On Fri, Sep 24, 2010 at 4:29 PM, dan gibbs <
***@tenderapp.com<tender%***@tenderapp.com>
> wrote:
3 Posted by natty on 25 Sep, 2010 10:59 PM
Thanks, Im just learning MVC so will have a look at view models.
Dan
4 Posted by Kila Morton on 27 Sep, 2010 06:38 AM
I have had this issue before. In my case I had my models sitting in a separate class library. Whenever I added a new class, it was not immediately picked up when I went to create a strongly typed view using that class. All I did to remedy the situation was to rebuild my model class library after adding additional classes. After rebuilding, the classes display in the drop down the way they are supposed to. This isn't a Fluent NHibernate issue. This is a Visual Studio issue.
I hope this helps.