Add drafts of controllers, repositories and model class

This commit is contained in:
Sébastien André
2019-09-19 23:19:49 +02:00
parent fcdb2f5017
commit 98d48ae2c6
31 changed files with 3729 additions and 2247 deletions

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace skydiveLogs_api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class AircraftController : ControllerBase
{
// GET: api/Aircraft
[HttpGet]
public IEnumerable<AircraftResp> Get()
{
return new AircraftResp[] { "value1", "value2" };
}
// GET: api/Aircraft/5
[HttpGet("{id}", Name = "Get")]
public AircraftResp Get(int id)
{
return "value";
}
// POST: api/Aircraft
[HttpPost]
public void Post([FromBody] AircraftReq value)
{
}
// PUT: api/Aircraft/5
[HttpPut("{id}")]
public void Put(int id, [FromBody] AircraftReq value)
{
}
// DELETE: api/ApiWithActions/5
[HttpDelete("{id}")]
public void Delete(int id)
{
}
}
}

View File

@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using skydiveLogs_api.DataContract;
namespace skydiveLogs_api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class DropZoneController : ControllerBase
{
// GET: api/DropZone
[HttpGet]
public IEnumerable<DropZoneResp> Get()
{
return new DropZoneResp[] { "value1", "value2" };
}
// GET: api/DropZone/5
[HttpGet("{id}", Name = "Get")]
public DropZoneResp Get(int id)
{
return "value";
}
// POST: api/DropZone
[HttpPost]
public void Post([FromBody] DropZoneReq value)
{
}
// PUT: api/DropZone/5
[HttpPut("{id}")]
public void Put(int id, [FromBody] DropZoneReq value)
{
}
// DELETE: api/ApiWithActions/5
[HttpDelete("{id}")]
public void Delete(int id)
{
}
}
}

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace skydiveLogs_api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class JumpController : ControllerBase
{
// GET: api/Jump
[HttpGet]
public IEnumerable<JumpResp> Get()
{
return new JumpResp[] { "value1", "value2" };
}
// GET: api/Jump/5
[HttpGet("{id}", Name = "Get")]
public JumpResp Get(int id)
{
return "value";
}
// POST: api/Jump
[HttpPost]
public void Post([FromBody] JumpReq value)
{
}
// PUT: api/Jump/5
[HttpPut("{id}")]
public void Put(int id, [FromBody] JumpReq value)
{
}
// DELETE: api/ApiWithActions/5
[HttpDelete("{id}")]
public void Delete(int id)
{
}
}
}

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace skydiveLogs_api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class JumpTypeController : ControllerBase
{
// GET: api/JumpType
[HttpGet]
public IEnumerable<JumpTypeResp> Get()
{
return new JumpTypeResp[] { "value1", "value2" };
}
// GET: api/JumpType/5
[HttpGet("{id}", Name = "Get")]
public JumpTypeResp Get(int id)
{
return "value";
}
// POST: api/JumpType
[HttpPost]
public void Post([FromBody] JumpTypeReq value)
{
}
// PUT: api/JumpType/5
[HttpPut("{id}")]
public void Put(int id, [FromBody] JumpTypeReq value)
{
}
// DELETE: api/ApiWithActions/5
[HttpDelete("{id}")]
public void Delete(int id)
{
}
}
}

View File

@@ -1,45 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace skydiveLogs_api.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class ValuesController : ControllerBase
{
// GET api/values
[HttpGet]
public ActionResult<IEnumerable<string>> Get()
{
return new string[] { "value1", "value2" };
}
// GET api/values/5
[HttpGet("{id}")]
public ActionResult<string> Get(int id)
{
return "value";
}
// POST api/values
[HttpPost]
public void Post([FromBody] string value)
{
}
// PUT api/values/5
[HttpPut("{id}")]
public void Put(int id, [FromBody] string value)
{
}
// DELETE api/values/5
[HttpDelete("{id}")]
public void Delete(int id)
{
}
}
}

View File

@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace skydiveLogs_api.DataContract
{
public class DropZoneReq
{
}
}

View File

@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace skydiveLogs_api.DataContract
{
public class DropZoneResp
{
}
}

View File

@@ -9,6 +9,12 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\skydiveLogs-api.Business\skydiveLogs-api.Business.csproj" />
<ProjectReference Include="..\skydiveLogs-api.Model\skydiveLogs-api.Model.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Controller_SelectedScaffolderID>ApiControllerWithActionsScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Controller</Controller_SelectedScaffolderCategoryPath>
<WebStackScaffolding_ControllerDialogWidth>600</WebStackScaffolding_ControllerDialogWidth>
<WebStackScaffolding_IsLayoutPageSelected>True</WebStackScaffolding_IsLayoutPageSelected>
<WebStackScaffolding_IsPartialViewSelected>False</WebStackScaffolding_IsPartialViewSelected>
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>True</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
<WebStackScaffolding_LayoutPageFile />
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
</PropertyGroup>
</Project>