The second mini project for Lexicon: Refactoring the asset tracker from MP1 to work with EF Core.
The project uses the NuGet package "Readline". (https://www.nuget.org/packages/ReadLine/)
-
In the main menu, type 'help' to see available commands.
-
By typing a part of a command and pressing tab, each press cycles through available commands that match the text.
-
The first time the application starts the example data will load. It can take a few seconds before the prompt displays.
-
The list command is an alias for list-all, which lists all assets currently in the system. The assets are color-coded as in MP1.
-
The list-not-expired command will list all assets that have not yet expired. Assets will still be color-coded as usual.
-
Since the example dataset is large, the list family of commands displays a page of a few assets at once. They allow allow the user to scroll through the pages by typing "up" or "down".
-
It is also possible to go directly to a page by typing in the number of that page.
- Basic statistics about the system can be displayed by using this command.
The following things have changed from the MP1 version:
- The Repository classes now use EF Core under the hood to talk to a database.
- Repository classes now support the full CRUD set of methods.
- Asset and Office classes have been moved to a Model layer. This layer also includes interfaces for allownig the repositories to talk to the Main Layer.
How to configure inheritance using the fluent API:
How to configure db columns generated by the migrations script:
How to make EF Core understand how to create DbContext when using non-default constructor: