Unit Testing compendium

I often hear developers saying they’d like to write tests or when was the last time they wrote unit test. That’s why I decided it’s good idea to write post about “how to” unit testing. You’ll learn how to write tests with good practices, how to make tests independent from another classes. I’ll show you…

Read More

DbContext vs Repo and UOW

This topic was discussed by a lot of developers. It’s not hard to find good article about it, but only if you know what you are looking for. When I started working with EF it was much easier to find articles that gave wrong answer, that’s why for pretty long time I was using bad…

Read More

EF Pitfalls

Every technology has its pitfalls. You may not even notice it. Here, I’ll present some of the most important pitfalls of Entity Framework that you should learn about and have an eye on during development. Additionally interviewers commonly asks about those things, because if you know answer for these, it’s sure you’ve been working with…

Read More

Entity Framework Advanced

Our client liked first version of Student application, and asked if we can extend it by adding new features. Students should get access to every course. Additionally teachers should be able to give them assessment. Every marks should have weight, so Exam marks will be the most important and homework mark less. Client said that…

Read More

Spike WebAPI

ASP.Net makes creating Web APIs as painless as possible. In this article I’ll walk you thru basics of ASP.Net Web API. You’ll learn how to setup EF Core with Web API and Swagger. Additionally I’ll go thru Student Controller which contains CRUD methods. Finally I’ll show you new features that were provided in .Net Core…

Read More

EF Migration

One of the greatest feature of Entity Framework are Migrations. Today I’ll tell you what Migrations are, how to create and use Migration. Finally I’ll tell you what limitations of Migrations are. I am personally a fan of automation and Migrations are all about automatizing database upgrades and downgrades. What are Migrations? As I said…

Read More

Spike EF Core

This is first post of Basic series where we gather everything we learned and write some code. We know theory, now it’s time for some practice. In future we will extend this sample project as new topics will arrive. For now let’s begin. Requirements Our client wants us to create for him simple school API.…

Read More

Entity Framework Code First vs DB First

Before we can jump into the fray we need to decide how we want to approach modeling of our entities. There are two options and both have their advantages and problems. Today we’re going to cover both approaches, after that you’ll know which, Code First or DB First choose in your project. Code First As…

Read More

Access Database – ORM vs SQL

Almost every application stores data somewhere. It is very often stored in database. If you want to store data, you need to find a way to access database. Today I’ll describe possible methods to access database with advantages and problems. Possible options You should know that there is a lot of ways to access database…

Read More