Creating a data repository using EF
Each data-driven application needs a place to store data. Using the filesystem can be enough for one application but is not a good option when multiple requests access the same data. This choice is also not the fastest.
Modern applications use databases to store data. These can be relational databases such as MSSQL, MariaDB, SQLite, or Oracle Database, or NoSQL databases such as Redis, MongoDB, or Cassandra. In our demo project, we will use the MSSQL database because it is one of the most commonly used databases for applications written in C#.
However, the database itself is the only place where data is stored and comprises a set of mechanisms for how data is handled when we want to create, read, update, or delete any record. Each application needs a connector that will open the communication between the application and the database and transform data from the database to make it readable in the application.