Skip to content

godefoy1988/Drone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drones Author

Jose Luis Correa Godefoy godefoy1988@gmail.com

Developer Setup

Postman

  • 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

Visual Studio

  • 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

Build & Run in Visual Studio

  • Open the Drones.sln file using Visual Studio
  • Set project Drones.csproj as startup project
  • Press f5 key

Build & Run outside Visual Studio

  • run command in the folder that contain the Drones.csproj (./Drones/Drones/Drones.csproj) and run the command:
dotnet run .\Drones.csproj

Drones Application Structure

The solution contain 2 projects:

Drones

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

Drones.Model

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages