EF Code First Navigation Properties and Foreign Keys

An Entity Framework Code First class corresponding to a table with a foreign key typically has two fields for the foreign key. The foreign key as represented in the database and a C# reference. [ForeignKey("BrandId")] public Brand Brand { get; set; }   [ForeignKey("Brand")] public int BrandId { get; set; }[ForeignKey("BrandId")] public Brand Brand {… Continue reading EF Code First Navigation Properties and Foreign Keys

Scrum and Project Governance

As a developer I’ve been happy with scrum, but as I’ve been more involved in project management I’ve felt that there is something missing. When I talked to two of our most experienced project managers at Kentor; Susanne Ribbing and Cecilia Andersson I realized that what I was missing was project governance. Looking thoroughly, it is enough with a… Continue reading Scrum and Project Governance

EF Migrations Command Reference

Entity Framework Migrations are handled from the package manager console in Visual Studio. The usage is shown in various tutorials, but I haven’t found a complete list of the commands available and their usage, so I created my own. There are four available main commands. Enable-Migrations: Enables Code First Migrations in a project. Add-Migration: Scaffolds a migration… Continue reading EF Migrations Command Reference

Scrum – Nowhere to Hide

Scrum as a methodology is very transparent, everything is done in open sunlight where everyone can view. Following the spirit of scrum, everything is open for all stake holders to watch. The requirements must be detailed before the sprint planning, the team can reject a product backlog item that is not complete. The developers have… Continue reading Scrum – Nowhere to Hide

EF Code First Change Tracking

Change tracking is a central concept for every Object-Relational Mapper, including Entity Framework. When doing updates to objects the normal work flow with Entity Framework has three steps. Retrieve data from the database. Update some properties on some objects. Save the updates to the database. In the third step Entity Framework has to find out… Continue reading EF Code First Change Tracking