The Entity Framework (EF) with Code First is so popular that any database developer should own skills for this kind of development. If you make a search of EF with Code First, you’ll find tons of tutorial figuring out how it works and all things relevant. Therefore in this blog post, I don’t intend to give you something new, indeed there is nothing new. I just want to make a summary of all necessary basic steps when I start a project with EF Code First. So if you’re already professional with EF, just skip this post.
Synchronizing data in real time is such a big problem to solve in business application. It’s difficult to ensure that the data is updated correctly or not in a “zombie” status (a status, that should never happens) because differences always exist between programming cases, unit test cases and real cases. Although we’re trying to cover all possible cases but unexpected problems still happen when the program runs with many users in different environments (location, internet speed, latency, network cable, hardware, how the user uses program…). It is an art of combination of programming technique and MS SQL Server administrative job so that even if an error happens, we can still hold ACID (Atomicity, Consistency, Isolation, Durability) properties of our databases and our programs don’t simply crash.