Add a DB init service when there is not database.
This commit is contained in:
83
Back/skydiveLogs-api.Business/InitDbService.cs
Normal file
83
Back/skydiveLogs-api.Business/InitDbService.cs
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
|
using skydiveLogs_api.Business.Interface;
|
||||||
|
using skydiveLogs_api.Model;
|
||||||
|
|
||||||
|
|
||||||
|
namespace skydiveLogs_api.Business
|
||||||
|
{
|
||||||
|
public class InitDbService : IInitDbService
|
||||||
|
{
|
||||||
|
public InitDbService(IAircraftService aircraftService,
|
||||||
|
IJumpTypeService jumpTypeService,
|
||||||
|
IDropZoneService dropZoneService)
|
||||||
|
{
|
||||||
|
_aircraftService = aircraftService;
|
||||||
|
_jumpTypeService = jumpTypeService;
|
||||||
|
_dropZoneService = dropZoneService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void GenerateDb()
|
||||||
|
{
|
||||||
|
LoadAircrafts();
|
||||||
|
LoadDropZones();
|
||||||
|
LoadJumpTypes();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadDropZones()
|
||||||
|
{
|
||||||
|
var jsonString = File.ReadAllText("Data/Init/dropZone.json");
|
||||||
|
var options = new JsonSerializerOptions
|
||||||
|
{
|
||||||
|
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
|
||||||
|
WriteIndented = true
|
||||||
|
};
|
||||||
|
var jsonModel = JsonSerializer.Deserialize<List<DropZone>>(jsonString, options);
|
||||||
|
|
||||||
|
foreach (var item in jsonModel)
|
||||||
|
{
|
||||||
|
_dropZoneService.AddNewDz(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadJumpTypes()
|
||||||
|
{
|
||||||
|
var jsonString = File.ReadAllText("Data/Init/jumpType.json");
|
||||||
|
var options = new JsonSerializerOptions
|
||||||
|
{
|
||||||
|
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
|
||||||
|
WriteIndented = true
|
||||||
|
};
|
||||||
|
var jsonModel = JsonSerializer.Deserialize<List<JumpType>>(jsonString, options);
|
||||||
|
|
||||||
|
foreach (var item in jsonModel)
|
||||||
|
{
|
||||||
|
_jumpTypeService.AddNewJumpType(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadAircrafts()
|
||||||
|
{
|
||||||
|
var jsonString = File.ReadAllText("Data/Init/aircraft.json");
|
||||||
|
var options = new JsonSerializerOptions
|
||||||
|
{
|
||||||
|
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
|
||||||
|
WriteIndented = true
|
||||||
|
};
|
||||||
|
var jsonModel = JsonSerializer.Deserialize<List<Aircraft>>(jsonString, options);
|
||||||
|
|
||||||
|
foreach (var item in jsonModel)
|
||||||
|
{
|
||||||
|
_aircraftService.AddNewAircraft(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private readonly IAircraftService _aircraftService;
|
||||||
|
|
||||||
|
private readonly IJumpTypeService _jumpTypeService;
|
||||||
|
|
||||||
|
private readonly IDropZoneService _dropZoneService;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace skydiveLogs_api.Business.Interface
|
||||||
|
{
|
||||||
|
public interface IInitDbService
|
||||||
|
{
|
||||||
|
public void GenerateDb();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
using Microsoft.Extensions.Configuration;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
|
|
||||||
namespace skydiveLogs_api.Ioc
|
namespace skydiveLogs_api.Ioc
|
||||||
{
|
{
|
||||||
public class IocService
|
public class IocService
|
||||||
@@ -14,11 +17,6 @@ namespace skydiveLogs_api.Ioc
|
|||||||
|
|
||||||
public void Configure()
|
public void Configure()
|
||||||
{
|
{
|
||||||
//services.AddSingleton<IConfigurationRoot>(Configuration);
|
|
||||||
//_services.AddSingleton<Services.IGroupService, Services.GroupService>();
|
|
||||||
//_services.AddSingleton<Services.IUserService, Services.UserService>();
|
|
||||||
//_services.AddSingleton<Services.IPermissionService, Services.PermissionService>();
|
|
||||||
|
|
||||||
_services.AddScoped<Business.Interface.IAircraftService, Business.AircraftService>();
|
_services.AddScoped<Business.Interface.IAircraftService, Business.AircraftService>();
|
||||||
_services.AddScoped<Business.Interface.IGearService, Business.GearService>();
|
_services.AddScoped<Business.Interface.IGearService, Business.GearService>();
|
||||||
_services.AddScoped<Business.Interface.IDropZoneService, Business.DropZoneService>();
|
_services.AddScoped<Business.Interface.IDropZoneService, Business.DropZoneService>();
|
||||||
@@ -27,6 +25,7 @@ namespace skydiveLogs_api.Ioc
|
|||||||
_services.AddScoped<Business.Interface.IStatsService, Business.StatsService>();
|
_services.AddScoped<Business.Interface.IStatsService, Business.StatsService>();
|
||||||
_services.AddScoped<Business.Interface.IUserService, Business.UserService>();
|
_services.AddScoped<Business.Interface.IUserService, Business.UserService>();
|
||||||
_services.AddScoped<Business.Interface.IUserImageService, Business.UserImageService>();
|
_services.AddScoped<Business.Interface.IUserImageService, Business.UserImageService>();
|
||||||
|
_services.AddScoped<Business.Interface.IInitDbService, Business.InitDbService>();
|
||||||
|
|
||||||
_services.AddScoped<Data.Interface.IAircraftRepository, Data.AircraftRepository>();
|
_services.AddScoped<Data.Interface.IAircraftRepository, Data.AircraftRepository>();
|
||||||
_services.AddScoped<Data.Interface.IDropZoneRepository, Data.DropZoneRepository>();
|
_services.AddScoped<Data.Interface.IDropZoneRepository, Data.DropZoneRepository>();
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
[
|
|
||||||
{"id":1,"Name":"Pilatus PC-6"},
|
|
||||||
{"id":2,"Name":"Caravan"},
|
|
||||||
{"id":3,"Name":"Skyvan"},
|
|
||||||
{"id":4,"Name":"Twin Otter"},
|
|
||||||
{"id":5,"Name":"PAC 750"},
|
|
||||||
{"id":6,"Name":"CASA C-212"},
|
|
||||||
{"id":7,"Name":"Cessna 206"},
|
|
||||||
{"id":8,"Name":"Dornier"}
|
|
||||||
]
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
[
|
|
||||||
{"id":2,"Latitude":"43.4305","Longitude":"5.40197","Name":"iFLY - Aix/Marseille","Address":"Decathlon Village - La Petite Bastide</br>Avenue des Chabauds, RN8</br>13320 Bouc-Bel-Air","Website":"www.iflyfrance.com","Email":"contact@iflyaixmarseille.fr","Type":["tunnel"],"IsFavorite":false},
|
|
||||||
{"id":3,"Latitude":"48.42851765","Longitude":"4.48127962577103","Name":"Brienne - Aube Parachutisme","Address":"A\u00e9rodrome de Brienne Le Ch\u00e2teau</br>10500 Pr\u00e9\u00e7y-Saint-Martin","Website":"www.aubeparachutisme.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":4,"Latitude":"50.78266","Longitude":"3.00485","Name":"Ice Mountain Adventure Park","Address":"Rue de Capelle 16</br>7780 Comines-Warneton - Belgique","Website":"www.ice-mountain.com","Email":"indoorskydiving@ice-mountain.com","Type":["tunnel"],"IsFavorite":false},
|
|
||||||
{"id":5,"Latitude":"-21.82105","Longitude":"165.86077","Name":"La Foa","Address":"A\u00e9rodrome de La Foa Ouatom (Nouvelle-Cal\u00e9donie)","Website":"www.cepnc.com","Email":"cepnc1@gmail.com","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":6,"Latitude":"44.00109","Longitude":"4.75815","Name":"Skydive Pujaut","Address":null,"Website":"www.skydive-pujaut.com","Email":null,"Type":["dz"],"IsFavorite":true},
|
|
||||||
{"id":7,"Latitude":"43.60392","Longitude":"3.91888","Name":"Montpellier - Twistair","Address":"Odysseum</br>34 000 Montpellier","Website":"www.twist-air.com","Email":null,"Type":["tunnel"],"IsFavorite":false},
|
|
||||||
{"id":8,"Latitude":"44.45564","Longitude":"6.03411","Name":"Gap - CERPS","Address":"A\u00e9rodrome de Gap Tallard</br>630 rue Pierre-Georges Lat\u00e9co\u00e8re</br>05130 Tallard","Website":"parachutismegap.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":9,"Latitude":"45.898776","Longitude":"6.838590","Name":"Rock Drop","Address":null,"Website":"www.rock-drop.com","Email":"contact@rock-drop.com","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":10,"Latitude":"51.01451","Longitude":"5.52507","Name":"Zwartberg Skydive Flanders","Address":"Vliegplein 1, 3600 Genk","Website":"www.skydiveflanders.be","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":11,"Latitude":"51.00225","Longitude":"5.06817","Name":"Schaffen Skydive Flanders","Address":"Nieuwe Dijkstraat 44, 3290 Schaffen","Website":"www.skydiveflanders.be","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":12,"Latitude":"50.84966","Longitude":"3.14724","Name":"Moorsele Skydive Flanders","Address":"Ledegemstraat 140, 8560 Moorsele","Website":"www.skydiveflanders.be","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":13,"Latitude":"46.82826","Longitude":"4.82633","Name":"Ch\u00e2lon sur S\u00e2one - Sky Circus","Address":"71530 A\u00e9rodrome de Chalon-Champforgeuil","Website":"www.chutelibre-shop.fr","Email":null,"Type":["tunnel"],"IsFavorite":false},
|
|
||||||
{"id":14,"Latitude":"43.21733","Longitude":"0.07492","Name":"Tarbes - CEP de la Bigorre","Address":"A\u00e9rodrome de Laloub\u00e8re</br>65310 Laloub\u00e8re","Website":"www.parachutisme-tarbes.fr","Email":"cepb65@gmail.com","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":15,"Latitude":"49.86957","Longitude":"2.38775","Name":"Amiens - Amiens Parachutisme","Address":"A\u00e9rodrome d'Amiens-Glisy</br>Rue Robur le Conqu\u00e9rant</br>80440 Glisy","Website":"www.sauterenparachute.com","Email":"contact@sauterenparachute.com","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":16,"Latitude":"47.27358","Longitude":"5.07270","Name":"Dijon - BFCP","Address":"A\u00e9roport de Dijon Bourgogne</br>1925 Rue de l'aviation</br>21600 Ouges","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":17,"Latitude":"41.65905","Longitude":"8.89382","Name":"Corse - EP du Valinco","Address":"A\u00e9rodrome Tavaria - BP28</br>20110 Propriano","Website":"www.corseparachutisme.fr","Email":"info@skydivecorsica.com","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":18,"Latitude":"45.86880","Longitude":"5.18445","Name":"Lyon - Ciel dAventure","Address":"20 rue Caillet</br>69001 Lyon","Website":"www.cieldav.com","Email":"contact@cieldav.com","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":19,"Latitude":"46.59473","Longitude":"7.09306","Name":"Ch\u00e2teau-d'Oex - EPCO","Address":"l'a\u00e9rodrome de la Gruy\u00e8re, \u00e0 Epagny et l'a\u00e9rodrome de Colombier","Website":"www.skydive-gruyere.ch","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":20,"Latitude":"43.42730","Longitude":"-0.28856","Name":"Pau - Paradise 64","Address":"A\u00e9rodrome de Lasclaveries</br>64450 Lasclaverie","Website":"www.paradise64.fr","Email":"contact@paradise64.fr","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":21,"Latitude":"-21.609549","Longitude":"165.400054","Name":"Noum\u00e9a - Noum\u00e9a Skydive","Address":"BP 18545</br>98857 Noum\u00e9a Cedex","Website":"www.parachutisme.nc","Email":"max@parachutisme.nc","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":22,"Latitude":"-21.32013","Longitude":"55.42761","Name":"La R\u00e9union - Para-club de Bourbon","Address":"A\u00e9rodrome de Pierrefonds</br>97410 St Pierre","Website":"www.para-bourbon.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":23,"Latitude":"37.29609","Longitude":"-6.16122","Name":"S\u00e9ville - Skydive Spain","Address":"Aerodromo La Juliana</br>Bollullos de la Mitaciu00f3n","Website":"www.skydivespain.com","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":24,"Latitude":"39.99553","Longitude":"0.02519","Name":"Castellon - Skytime","Address":"A\u00e9rodrome El PinarCamino de La Plana</br>12100 El Grao","Website":"www.skytime.info","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":25,"Latitude":"37.14756","Longitude":"-8.58114","Name":"Algarve - Skydive Algarve","Address":"Aerodrome de Portim\u00e3o - Montes de Alvor</br>8500-059 Portim\u00e3o/Alvor</br>Portugal","Website":"www.skydivealgarve.com","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":26,"Latitude":"42.25968","Longitude":"3.10908","Name":"Empuriabrava - Skydive Empuria","Address":"Ampuriabrava - Gerona - 17487","Website":"www.skydiveempuriabrava.com","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":27,"Latitude":"50.15202","Longitude":"4.38704","Name":"Cerfontaine - Skydive Cerfontaine","Address":"Route des Lacs</br>50 - B5630 Cerfontaine","Website":"www.skydivecerfontaine.be","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":28,"Latitude":"46.2575","Longitude":"6.9867","Name":"Bex - Flying Devil","Address":"A\u00e9rodrome de Bex</br>1880 Bex Suisse","Website":"www.Flying-Devil.com","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":29,"Latitude":"50.47998","Longitude":"5.91407","Name":"Spa - Skydive Spa","Address":"122 route de la sauveni\u00e8re</br>B-4900 Spa","Website":"www.skydivespa.be","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":30,"Latitude":"42.257868","Longitude":"3.108497","Name":"Empuriabrava - Windoor Realfly","Address":"Sector Aeroclub</br>17486 Empuriabrava, Giron, Spain","Website":"www.windoor-realfly.com","Email":"Proflyer@windoor-realfly.com","Type":["tunnel"],"IsFavorite":false},
|
|
||||||
{"id":31,"Latitude":"50.64516","Longitude":"5.46701","Name":"Li\u00e8ge - Fly-In","Address":"8 Rue de l'a\u00e9roport</br>B-4460 Gr\u00e2ce Hollogne</br>Li\u00e8ge, Belgique","Website":"www.fly-in.be","Email":null,"Type":["tunnel"],"IsFavorite":false},
|
|
||||||
{"id":32,"Latitude":"50.58383","Longitude":"3.09533","Name":"Lille - Weembi","Address":"730 Rue Maurice Herzog</br>59810 Lesquin","Website":"www.weembi.com","Email":"info@weembi.com","Type":["tunnel"],"IsFavorite":false},
|
|
||||||
{"id":33,"Latitude":"45.72502","Longitude":"4.93902","Name":"Lyon Saint-Priest - iFLY Lyon","Address":"A\u00e9roport de Lyon-Bron</br>48 ancienne route de Grenoble</br>69800 Saint-Priest","Website":"www.iflyfrance.com","Email":"info.lyon@iflyworld.com","Type":["tunnel"],"IsFavorite":true},
|
|
||||||
{"id":34,"Latitude":"46.22094","Longitude":"7.35205","Name":"Sion - Realfly","Address":"1950 Sion</br>Suisse 58, Route de la Drague","Website":"www.realfly.ch","Email":null,"Type":["tunnel"],"IsFavorite":false},
|
|
||||||
{"id":35,"Latitude":"47.72723","Longitude":"-2.72502","Name":"Vannes - EPS Vannes-Bretagne","Address":"A\u00e9rodrome de Vannes-Meucon</br>1-2 Rue Kersimon</br>56250 Monterblanc","Website":"www.parachutisme-vannes.fr","Email":"accueil@parachutisme-vannes.fr","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":36,"Latitude":"47.25469","Longitude":"-0.10831","Name":"Saumur - CERPS","Address":"118 rue des Landes</br>BP 33 - 49426 Saumur cedex","Website":"www.saumur-parachutisme.com","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":37,"Latitude":"48.55473","Longitude":"7.78487","Name":"Strasbourg - CERP Alsace","Address":"A\u00e9rodrome du Polygone</br>67100 Strasbourg 82 rue de la Musau","Website":"alsace-para.com","Email":"info@alsace-para.com","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":38,"Latitude":"47.98379","Longitude":"3.77448","Name":"Saint Florentin - Paris Jump","Address":"A\u00e9rodrome de Ch\u00e9u</br>89600 St Florentin","Website":"www.parisjump.com","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":39,"Latitude":"45.60574","Longitude":"4.30375","Name":"Saint Etienne - A.S.P.L./C.E.P.","Address":"A\u00e9rodrome de Saint-Galmier</br>42330 - Saint-Galmier","Website":"www.para42.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":40,"Latitude":"45.63339","Longitude":"-0.97613","Name":"Royan - Europh\u00e9nix 17","Address":"A\u00e9rodrome de Royan-M\u00e9dis</br>17600 M\u00e9dis","Website":"www.europhenix17.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":41,"Latitude":"46.05209","Longitude":"4.00329","Name":"Roanne - Skydive Roanne","Address":"42155 A\u00e9rodrome de Roanne","Website":"www.skydiveroanne.fr","Email":"info@skydiveroanne.fr","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":42,"Latitude":"49.87168","Longitude":"3.04032","Name":"P\u00e9ronne - CPPPHS","Address":"CPPPHS SARL - BP 80051</br>80201 P\u00e9ronne Cedex","Website":"www.skydive-peronne.fr","Email":"skydive.peronne@gmail.com","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":43,"Latitude":"43.09240","Longitude":"1.69954","Name":"Pamiers - CEPS Ari\u00e8ge","Address":"A\u00e9rodrome de Pamiers les Pujols</br>09101 Pamiers","Website":"www.parachutisme-pamiers.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":44,"Latitude":"43.42730","Longitude":"-0.28856","Name":"Pau - Parachutisme Passion","Address":"A\u00e9rodrome</br>64450 Lasclaveries","Website":"www.pau-skydive.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":45,"Latitude":"47.90230","Longitude":"2.16910","Name":"Orl\u00e9ans - EPCOL","Address":"A\u00e9roport du Loiret</br>45550 - Saint Denis de l'H\u00f4tel","Website":"parachutisme-orleans.net","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":46,"Latitude":"46.31478","Longitude":"-0.40147","Name":"Niort - D\u00e9menciel Parachutisme","Address":"A\u00e9rodrome de Niort Marais - Poitevin</br>Avenue de Limoges - 79000 Niort","Website":"www.demencielparachutisme.com","Email":"contact@demencielparachutisme.com","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":47,"Latitude":"44.07020","Longitude":"4.14399","Name":"Neemes - Accel-air","Address":"A\u00e9rodrome de Nu00eemes-Courbessac</br>Hangar, chemin de l'a\u00e9rodrome</br>30000 Nu00eemes Courbessac</br></br>-A\u00e9rodrome de Millau La Cavalerie</br>Route d\u00e9partemental 809</br>12230 La Cavalerie","Website":"www.accel-air.com","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":48,"Latitude":"48.59240","Longitude":"6.24500","Name":"Nancy - EFP Nancy Lorraine","Address":"A\u00e9rodrome de Nancy Azelot</br>54210 Azelot","Website":"www.paranancy.com","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":49,"Latitude":"46.99906","Longitude":"3.10917","Name":"Nevers - CP Paris-Nevers","Address":"A\u00e9roport de Nevers Fourchambault</br>58180 Nevers","Website":"www.paraparisnevers.com","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":50,"Latitude":"44.14793","Longitude":"-1.16311","Name":"Mimizan - OJB Parachutisme","Address":"A\u00e9rodrome de Mimizan</br>40200 Mimizan","Website":"www.ojbpara.com","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":51,"Latitude":"47.49204","Longitude":"6.79114","Name":"Montb\u00e9liard - EPNFC","Address":"A\u00e9rodrome de Courcelles l\u00e8s Montb\u00e9liard</br>25420 Courcelles","Website":"www.epnfc.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":52,"Latitude":"50.31594","Longitude":"4.02990","Name":"Maubeuge - CERPM","Address":"A\u00e9rodrome de la Salmagne</br>59600 Vieux Reng","Website":"www.skydivemaubeuge.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":53,"Latitude":"45.65804","Longitude":"4.91376","Name":"Lyon - EPLC","Address":"Rue Cl\u00e9ment Ader</br>69960 Corbas","Website":"parachutisme-lyon.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":54,"Latitude":"50.46500","Longitude":"2.82039","Name":"Lens - CERP Lens","Address":"A\u00e9rodrome Lens - B\u00e9nifontaine</br>62410 B\u00e9nifontaine","Website":"www.lens-parachutisme.com","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":55,"Latitude":"48.03037","Longitude":"-0.74492","Name":"Laval - Centre \u00e9cole de la Mayenne","Address":"Parachutisme Laval</br>Chemin de l'Etronnier - 53000","Website":"www.parachutismelaval.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":56,"Latitude":"49.20504","Longitude":"-1.50625","Name":"Lessay - EP de Lessay","Address":"A\u00e9rodrome de Lessay</br>30 Route de l'a\u00e9rodrome</br>50430 Lessay","Website":"www.aair-parachutisme.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":57,"Latitude":"48.75120","Longitude":"-3.46701","Name":"Lannion - Septi\u00e8me Ciel Parachutisme","Address":"126 rue de l'a\u00e9rodrome</br>P\u00e9gase sud</br>22300 Lannion","Website":"www.septiemeciel-parachutisme.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":58,"Latitude":"49.53198","Longitude":"0.09323","Name":"Le Havre - Abeille Parachutisme","Address":"A\u00e9roport du Havre/Octeville</br>76620 Le Havre","Website":"www.abeilleparachutisme.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":59,"Latitude":"46.62535","Longitude":"1.08696","Name":"Le Blanc - EFP Le Blanc","Address":"A\u00e9rodrome - 36300 Le Blanc","Website":"www.efpleblanc.com","Email":"info@efpleblanc.com","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":60,"Latitude":"46.69947","Longitude":"-1.37625","Name":"La Roche sur Yon - Vend\u00e9e Chute Libre","Address":"A\u00e9rodrome Ren\u00e9 Couzinet</br>85000 La Roche-sur-Yon","Website":"www.vendee-chutelibre.com","Email":"vendeechutelibre@orange.fr","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":61,"Latitude":"45.36632","Longitude":"5.32725","Name":"Grenoble - CEP Grenoble","Address":"A\u00e9rodrome de Grenoble Alpes Is\u00e8re</br>38590 - St Etienne de St Geoirs","Website":"www.parachutisme38.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":62,"Latitude":"48.05227","Longitude":"-3.66317","Name":"Guiscriff - EPBA","Address":"A\u00e9rodrome Bretagne-Atlantique de Scaebr-Guiscriff Pont Person</br>56560 Guiscriff","Website":"epba-parachutisme.sportsregions.fr","Email":"epbaguiscriff@gmail.com","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":63,"Latitude":"44.56609","Longitude":"-0.05352","Name":"La R\u00e9ole - Espace Chute Libre","Address":"A\u00e9rodrome de La R\u00e9ole - 33190","Website":"www.parachute-gironde.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":64,"Latitude":"49.66560","Longitude":"2.96916","Name":"Fr\u00e9toy le Ch\u00e2teau - Skydive Fr\u00e9toy","Address":"A\u00e9rodrome</br>Le Bois de Ham</br>60640 Fr\u00eatoy le ch\u00e2teau","Website":"www.skydivefretoy.com","Email":"contact@skydivefretoy.com","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":65,"Latitude":"49.88459","Longitude":"1.08747","Name":"Dieppe - Air Libre Parachutisme","Address":"A\u00e9rodrome de Dieppe</br>76550 St Aubin sur Scie","Website":"www.airlibre-parachutisme.com","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":66,"Latitude":"45.63283","Longitude":"5.88416","Name":"Chamb\u00e9ry - EP de Savoie","Address":"A\u00e9roport de Chamb\u00e9ry</br>73420 Le Viviers du Lac","Website":"www.savoieparachutisme.com","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":67,"Latitude":"46.82828","Longitude":"4.82631","Name":"Ch\u00e2lon sur S\u00e2one - Parachutisme 71","Address":"A\u00e9rodrome de Champforgeuil</br>71530 Ch\u00e2lon sur S\u00e2one","Website":"www.parachutisme71.com","Type":["dz"],"IsFavorite":true},
|
|
||||||
{"id":68,"Latitude":"44.34905","Longitude":"1.47618","Name":"Cahors - CEP de Cahors","Address":"A\u00e9rodrome Cahors Lalbenque</br>46230 Cieurac","Website":"www.parachutisme.com","Email":"cep46@wanadoo.fr","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":69,"Latitude":"43.27794","Longitude":"0.51819","Name":"Castelnau Magnoac - Air 65","Address":"5 chemin de l'a\u00e9rodrome</br>65230 Castelnau-Magnoac","Website":"www.air65-parachutisme.fr","Email":"infos@air65.fr","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":70,"Latitude":"44.30560","Longitude":"1.08067","Name":"Bouloc - EP Midi-Pyr\u00e9n\u00e9es","Address":"A\u00e9rodrome Cardenal</br>82110 Bouloc","Website":"www.bouloc-skydive.com","Email":"accueil@bouloc-skydive.com","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":71,"Latitude":"50.68738","Longitude":"3.08163","Name":"Bondues - EFP Lille Bondues","Address":"98 Parc de l'a\u00e9rodrome</br>59910 Bondues","Website":"www.parachutisme-lille.fr","Email":"contact@parachutisme-lille.fr","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":72,"Latitude":"47.20555","Longitude":"6.07627","Name":"Besan\u00e7on - EP de Besan\u00e7on Franche Comt\u00e9","Address":"Route de l'a\u00e9rodrome</br>25660 La V\u00e8ze","Website":"www.parabesancon.fr","Email":"para.besac@wanadoo.fr","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":73,"Latitude":"44.59828","Longitude":"-1.11564","Name":"Arcachon - Arcachon Parachutisme","Address":"A\u00e9rodrome Villemarie</br>33260 La Teste de Buch","Website":"www.arcachon-parachutisme.fr","Email":"info@arcachon-parachutisme.fr","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":74,"Latitude":"46.19398","Longitude":"6.26921","Name":"Annemasse - Parachutisme 74","Address":"A\u00e9rodrome d'Annemasse - 74100 Annemasse","Website":"www.parachutisme74.com","Email":"info@parachutisme74.com","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":75,"Latitude":"48.89582","Longitude":"2.38941","Name":"Paris - iFLY Paris","Address":"La Villette</br>30 avenue Corentin Cariou</br>75019 Paris","Website":"www.iflyfrance.com","Email":"info.paris@iflyworld.com","Type":["tunnel"],"IsFavorite":false},
|
|
||||||
{"id":76,"Latitude":"44.45828","Longitude":"6.03739","Name":"Gap - Skydive Center","Address":"A\u00e9rodrome de Gap Tallard</br>05130 Tallard","Website":"www.skydivecenter.fr","Email":null,"Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":77,"Latitude":"44.45843","Longitude":"6.03631","Name":"Gap - On'Air","Address":"A\u00e9rodrome de Gap-Tallard</br>05130 Tallard","Website":"www.onairtunnel.com","Email":"contact@onairtunnel.com","Type":["tunnel"],"IsFavorite":false},
|
|
||||||
{"id":78,"Latitude":"48.9569381","Longitude":"2.2048741","Name":"Argenteuil - Aerokart","Address":"199/203 Route de Pontoise</br>95100 Argenteuil","Website":"www.aerokart.com","Email":"planning@aerokart.com","Type":["tunnel"],"IsFavorite":false},
|
|
||||||
{"id":79,"Latitude":"43.17301","Longitude":"2.73667","Name":"L\u00e9zignan Corbi\u00e8res - Flyzone","Address":"A\u00e9rodrome de L\u00e9zignan-Corbi\u00e8res - 11200","Website":"www.flyzone.fr","Email":null,"Type":["dz","tunnel"],"IsFavorite":false},
|
|
||||||
{"id":80,"Latitude":"43.38849","Longitude":"6.37716","Name":"Le Luc - C.E.P. C\u00f4te d'Azur","Address":"83340 Le Cannet des Maures","Website":"www.skydivecepca.com","Email":"cepcaleluc@gmail.com","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":81,"Latitude":"50.95764","Longitude":"1.95463","Name":"Calais - Para Groupe Jean Bart","Address":"Rue Zamenhoff</br>59240 Dunkerque","Website":"www.parachutisme-nord.com","Email":"resa@parachutisme-nord.com","Type":["dz"],"IsFavorite":false},
|
|
||||||
{"id":82,"Latitude":"44.17662","Longitude":"0.58971","Name":"Agen - E.P. Agen","Address":"A\u00e9rodrome Agen la Garenne</br>47520 Le Passage","Website":"www.agen-parachutisme.org","Email":null,"Type":["dz"],"IsFavorite":false}
|
|
||||||
]
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
{"id":1,"Name":"Javelin","Manufacturer":"Sun Path","MinSize":120,"MaxSize":135,"Aad":"Cypress 2","MainCanopy":"Pilot 150","ReserveCanopy":"Techno 128"}
|
|
||||||
]
|
|
||||||
42
Back/skydiveLogs-api/Data/Init/aircraft.json
Normal file
42
Back/skydiveLogs-api/Data/Init/aircraft.json
Normal file
File diff suppressed because one or more lines are too long
1053
Back/skydiveLogs-api/Data/Init/dropZone.json
Normal file
1053
Back/skydiveLogs-api/Data/Init/dropZone.json
Normal file
File diff suppressed because it is too large
Load Diff
54
Back/skydiveLogs-api/Data/Init/jumpType.json
Normal file
54
Back/skydiveLogs-api/Data/Init/jumpType.json
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "PAC"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"name": "RW 4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"name": "RW 8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"name": "RW X"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"name": "FreeFly"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6,
|
||||||
|
"name": "FreeStyle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 7,
|
||||||
|
"name": "Canopy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 8,
|
||||||
|
"name": "Track/Trace"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 9,
|
||||||
|
"name": "Wingsuit 1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10,
|
||||||
|
"name": "Wingsuit 2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11,
|
||||||
|
"name": "Wingsuit 3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12,
|
||||||
|
"name": "Canopy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 13,
|
||||||
|
"name": "Landing accuracy"
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
[
|
|
||||||
{"id":1,"JumpType":{"$id":2,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":3,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1000,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-22T21:46:02.9490000Z"}},
|
|
||||||
{"id":2,"JumpType":{"$id":11,"$ref":"JumpType"},"Aircraft":{"$id":1,"$ref":"Aircraft"},"DropZone":{"$id":36,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1000,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-23T22:41:05.0840000Z"}},
|
|
||||||
{"id":3,"JumpType":{"$id":11,"$ref":"JumpType"},"Aircraft":{"$id":1,"$ref":"Aircraft"},"DropZone":{"$id":36,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1000,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-22T22:41:05.0840000Z"}},
|
|
||||||
{"id":4,"JumpType":{"$id":11,"$ref":"JumpType"},"Aircraft":{"$id":1,"$ref":"Aircraft"},"DropZone":{"$id":36,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1000,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-23T22:41:05.0840000Z"}},
|
|
||||||
{"id":5,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-10T23:00:00.0000000Z"}},
|
|
||||||
{"id":6,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-10T23:00:00.0000000Z"}},
|
|
||||||
{"id":7,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-09T23:00:00.0000000Z"}},
|
|
||||||
{"id":8,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-09T23:00:00.0000000Z"}},
|
|
||||||
{"id":9,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-09T23:00:00.0000000Z"}},
|
|
||||||
{"id":10,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-09T23:00:00.0000000Z"}},
|
|
||||||
{"id":11,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-10T23:00:00.0000000Z"}},
|
|
||||||
{"id":12,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-09T23:00:00.0000000Z"}},
|
|
||||||
{"id":13,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-10T23:00:00.0000000Z"}},
|
|
||||||
{"id":14,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-10T23:00:00.0000000Z"}},
|
|
||||||
{"id":15,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-11T23:00:00.0000000Z"}},
|
|
||||||
{"id":16,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-12T23:00:00.0000000Z"}},
|
|
||||||
{"id":17,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-12T23:00:00.0000000Z"}},
|
|
||||||
{"id":18,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-11T23:00:00.0000000Z"}},
|
|
||||||
{"id":19,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-12T23:00:00.0000000Z"}},
|
|
||||||
{"id":20,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-11T23:00:00.0000000Z"}},
|
|
||||||
{"id":21,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-12T23:00:00.0000000Z"}},
|
|
||||||
{"id":22,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-11T23:00:00.0000000Z"}},
|
|
||||||
{"id":23,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-13T23:00:00.0000000Z"}},
|
|
||||||
{"id":24,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-11T23:00:00.0000000Z"}},
|
|
||||||
{"id":25,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-13T23:00:00.0000000Z"}},
|
|
||||||
{"id":26,"JumpType":{"$id":4,"$ref":"JumpType"},"Aircraft":{"$id":3,"$ref":"Aircraft"},"DropZone":{"$id":17,"$ref":"DropZone"},"Gear":{"$id":1,"$ref":"Gear"},"ExitAltitude":4000,"DeployAltitude":1500,"WithCutaway":false,"Notes":null,"JumpDate":{"$date":"2019-11-13T23:00:00.0000000Z"}}
|
|
||||||
]
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
[
|
|
||||||
{"id":1,"Name":"PAC"},
|
|
||||||
{"id":2,"Name":"RW 4"},
|
|
||||||
{"id":3,"Name":"RW 8"},
|
|
||||||
{"id":4,"Name":"RW X"},
|
|
||||||
{"id":5,"Name":"FreeFly"},
|
|
||||||
{"id":6,"Name":"FreeStyle"},
|
|
||||||
{"id":7,"Name":"Canopy"},
|
|
||||||
{"id":8,"Name":"Track/Trace"},
|
|
||||||
{"id":9,"Name":"Wingsuit 1"},
|
|
||||||
{"id":10,"Name":"Wingsuit 2"},
|
|
||||||
{"id":11,"Name":"Wingsuit 3"}
|
|
||||||
]
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,8 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.IO;
|
||||||
|
using System;
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
@@ -11,7 +14,7 @@ using Microsoft.IdentityModel.Tokens;
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
|
|
||||||
using skydiveLogs_api.Ioc;
|
using skydiveLogs_api.Ioc;
|
||||||
|
using skydiveLogs_api.Business.Interface;
|
||||||
|
|
||||||
namespace skydiveLogs_api
|
namespace skydiveLogs_api
|
||||||
{
|
{
|
||||||
@@ -69,6 +72,8 @@ namespace skydiveLogs_api
|
|||||||
|
|
||||||
// AutoMapper
|
// AutoMapper
|
||||||
services.AddAutoMapper(typeof(Mapper.ModelProfile));
|
services.AddAutoMapper(typeof(Mapper.ModelProfile));
|
||||||
|
|
||||||
|
CheckAndInitDb(services);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
@@ -90,6 +95,20 @@ namespace skydiveLogs_api
|
|||||||
app.UseMvc();
|
app.UseMvc();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CheckAndInitDb(IServiceCollection services)
|
||||||
|
{
|
||||||
|
string connectionString = Configuration.GetConnectionString("DefaultConnection");
|
||||||
|
string dbFile = connectionString.Replace("Filename=", string.Empty);
|
||||||
|
|
||||||
|
if (!File.Exists(dbFile))
|
||||||
|
{
|
||||||
|
var serviceProvider = services.BuildServiceProvider();
|
||||||
|
var initDbService = serviceProvider.GetRequiredService<IInitDbService>();
|
||||||
|
initDbService.GenerateDb();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public IConfiguration Configuration { get; }
|
public IConfiguration Configuration { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Data\JumpsDb.db">
|
<Content Include="Data\JumpsDb.db">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user