Re:A todo list for new ASP.NET Core projects
by tuespetre on Thursday February 08, 2018 @09:24AM
(#16332159)
I usually end up writing view models for reporting views because it condenses the type and amount data that is actually needed for the view, and (pet peeve) VS/Razor kind of don't work so well together in terms of notifying developers of errors while refactoring unless you actually have all of your views open in tabs in VS.
[ Parent
| on HN ]
Re:A todo list for new ASP.NET Core projects
by ctrl-j on Thursday February 08, 2018 @11:06AM
(#16333055)
> VS/Razor kind of don't work so well together in terms of notifying developers of errors while refactoring unless you actually have all of your views open in tabs in VS.
Two things:
1.) ReSharper full solution analysis should bring those errors up. I wouldn't leave it on all the time, but flipping it on/off occasionally works wonders.
2.) Even without that, turn on the option to compile your views when you build. It's not super graceful (you'll have to fix one error at a time), but at least you won't accidentally ship a broken view!