Skip to content

The second mini project for Lexicon: Refactoring the asset tracker from MP1 to work with EF Core.

License

Notifications You must be signed in to change notification settings

lambda-snail/MP_EF_NiclasBlomberg

Repository files navigation

MP_EF_NiclasBlomberg

The second mini project for Lexicon: Refactoring the asset tracker from MP1 to work with EF Core.

Requirements

The project uses the NuGet package "Readline". (https://www.nuget.org/packages/ReadLine/)

Minimal Manual

  • 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.

list and list-not-expired

  • 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.

reports

  • Basic statistics about the system can be displayed by using this command.

Changes since MP1

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.

Resources (for me)

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:

About

The second mini project for Lexicon: Refactoring the asset tracker from MP1 to work with EF Core.

Topics

Resources

License

Stars

Watchers

Forks

Languages