Getting familiar with EF Core is not easy at all.
Last week was hectic, I really had a lot of trouble trying to understand how EF Core works and understanding its concept, to the extent that I told my parents, I guess my supervisor regrets taking me as an intern, hahhahah.
So entity framework can simply be defined as an object which maps database to .NET. Mainly, Entity Framework (EF) and Entity Framework Core exist, such that the latter is an advanced version of EF and it supports features that EF cannot support .
EF Core is what we use at Tong Hin. It works by creating model classes and context objects which represent sessions with the database. Migrations are then used to create the database and update it as the model evolves and changes. EF Core supports relationships in database, ranging from One-to-One relationships, One-to-Many relationships, and Many-to-Many relationships.
EF Core can be used for querying and retrieving data from the database, save, edit and delete data. Taking note that all these functions are done in the model class of the entities.
The concept of EF Core is a lot, I will mention more about it in the next upcoming blogs.
Next, I was introduced to fluent assertion, which makes the assertion statement readable to anyone who has a look at the codes instead of using the statement Assert(2, 4), the following statement is more readable and understandable Answer.Should( ).Equal(2).
Clean code is a concept which involves ensuring that the codes written are easier to understand and are easier to change. Clean code can be written by adhering to the following basic guidelines which are, writing meaningful names, writing correct comments, following the standardized format of code writing, removing and refactoring unnecessary classes, and many other guidelines that can ensure that the codes written are considered as a clean code.
See you all next week again 🙂
