Mapping but not exposing ICollections in Entity Framework

UPDATE: As people pointed out I made a mistake when I first wrote this, the properties should be protected internal, not private internal (since that makes no sense) Jimmy Bogard wrote a post a couple of days ago sizing up EF 6 for fitness in use for a fully encapsulated… »

Git bash aliases

I like living in git bash on windows, however I also sometimes really need to jump into visual studio or sublime, so below are the two commands I run in git bash to add the shortcuts into bash. visual studio echo "alias vs=\"/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio… »

CS0135: 'Model' conflicts with the declaration 'System.Web.Mvc.WebViewPage<TModel>.Model'

After adding a declaration to pipe in some text from our model in a view in one of our MVC apps: @Model.Project I was hit with the above error message: CS0135: 'Model' conflicts with the declaration 'System.Web.Mvc.WebViewPage<TModel>.Model' it turns out that the… »

Unable to generate an explicit migration/Unable to update database

While working on a small feature for something at work today I needed to add a field in to one of our domain entities. It really was a tiny change: public DateTime? LastUpdated { get; private set; } After continuing on to add unit tests etc I tried to add the migration… »