The Electricity Rate App is a simple console app that allows a user to find the name of an electric utility provider, make a calculation of usage-based charges, or compare electric utility rates between cities. In addition, the app persists these results to a database via EF so that a history of these requests can be obtained. The source data is from U.S. Electric Utility Companies and Rates: Look-up by Zipcode 2016, and this CSV is deserialized and persisted to a database via EF. As well, this app also contains examples of the four principles of Object-Oriented Programming: Abstraction, Encapsulation, Inheritance, and Polymorphism.
- Clone the project from GitHub and run via Visual Studio (Open in Visual Studio link when cloning project).
- Use NuGet Package Manager Console (Tools>NuGet Package Manager>Package Manager Console) and seed the Rates database with test data by using the command update-database. You may have to restore the ConsoleTable, CSVHelper, and Entity Framework packages as well.
- Run the the project from Debug. On the first time project is opened, AddPowerRates() will execute and add residential rate information to the PowerRate table. This should only take a few moments.
- Once AddPowerRates() has excuted, the main menu will be available to use.