# Conflicts: # Sources/BowlingApi/BowlingApi.csproj # Sources/BowlingService/JoueurService.cs # Sources/DTOs/FrameDTO.cs # Sources/GraphQL Project/bowling.db # Sources/GraphQL Project/bowling.db-shmpull/7/head
commit
ca2856fa2a
@ -0,0 +1,63 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using BowlingService;
|
||||||
|
using BowlingService.Interfaces;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace BowlingApi.Controllers
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
[Route("api/[controller]")]
|
||||||
|
[ApiController]
|
||||||
|
public class PartieController : ControllerBase
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
private IpartieService _partieService;
|
||||||
|
|
||||||
|
public PartieController(IpartieService partieService)
|
||||||
|
{
|
||||||
|
_partieService = partieService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// GET: api/Partie
|
||||||
|
[HttpGet]
|
||||||
|
public IActionResult Get()
|
||||||
|
{
|
||||||
|
var result = _partieService.GetAll().Result;
|
||||||
|
return Ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET: api/Partie/5
|
||||||
|
[HttpGet("{name}")]
|
||||||
|
public IActionResult Get(string name)
|
||||||
|
{
|
||||||
|
return Ok(_partieService.GetDataWithName(name));
|
||||||
|
}
|
||||||
|
|
||||||
|
// POST: api/Partie
|
||||||
|
[HttpPost]
|
||||||
|
public void Post([FromBody] string value)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// PUT: api/Partie/5
|
||||||
|
[HttpPut("{id}")]
|
||||||
|
public void Put(int id, [FromBody] string value)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// DELETE: api/Partie/5
|
||||||
|
[HttpDelete("{id}")]
|
||||||
|
public void Delete(int id)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Loading…
Reference in new issue