Jose Luis Correa Godefoy godefoy1988@gmail.com
- Download and install the latest version of postman
- Open Postman app and go to File->Import and drop the file
Drone.postman_collection.json- This file contain the examples of how comunicate with the service
- Download and install the latest version of Visual Studio (recomended: version 17.5.5)
- Ensure the following are selected in the Workloads section:
- ASP.Net and web development
- .NET Core cross-platform development
- Ensure the following are selected in the Workloads section:
- Open the Drones.sln file using Visual Studio
- Set project Drones.csproj as startup project
- Press f5 key
- run command in the folder that contain the Drones.csproj (./Drones/Drones/Drones.csproj) and run the command:
dotnet run .\Drones.csproj
The solution contain 2 projects:
Wep Api service that have the business logic
- Controllers: Contain 3 controllers
- DroneController: for comunicate with drones
- Register: for register a drone
- GetAvailableDronesForLoading: get the available drones for loading
- GetBatteryLevel: get the battery label for a drone
- ChangeState: modify the state of a drone
- LoadController: for create loads
- Register: create a load for a drone
- GetLoadedMedicationsByDrone: get loads of a drone
- MedicationController: for create medications
- Register: create a medication
- DroneController: for comunicate with drones
- Extensions: Contain a extension for the class Drone
- Helpers: Contains methods for help in the logic of service
- Jobs: Contains 2 jobs that are executed in backgound
- CheckDronesHostedService: check for the battery levels of drones and create history/audit event log for them.
- WorkflowDronesLifeHostedService: contains the workflow logic for the system
- logs: that folder store the logs that are generated by the system
- Mappers: contains the mapper between storage classes and view model classes
- Services: Contains the services that execute the logic of controllers
- Validations: contains the custom validations for specific view models
- ViewModels: contains the view models of system
- appsettings.json: contains the setting of logs policy of system
- Program.cs: entry point of service that contains the startups logics and dependency injections of services
- usings.cs: the global namespaces that are common in the project
Class Library that have storage logic (the specific database is based in-memory)
- Context: Contain the DbContext for access to database
- Repository: Contains the repository pattern logic
- UnitOfWork: Contains the unit of work pattern logic
- Drone, Load, Medication are the models in the database
- EntityBase: Entity base for the rest of models in database
- usings.cs: the global namespaces that are common in the project