When both update-database and add-migrations fail while referring to each other
Today I checked out a project from Git on a new machine. The project was using Entity Framework to connect to a local SQL Server on my developer machine. To install the database I ran update-database...
View ArticleValidation attributes in Code First
DataAnnotations are really helpful when creating a model in Entity Framework Code-First. They are a simple way of instructing EF how you want the model to be structured and how it should translate the...
View ArticleDatabase related attributes in Code First
This post is a follow-up on the post about Validation attributes in Code-First. While validation attributes focus on making sure the data in the model is correct, the attributes listed here instead...
View ArticleMocking async repository calls
Mocking is a great technique for isolating code that you want to test. By mocking the interfaces a code section depends on you can create an isolation level where only the behavior of this specific...
View Article