Change AgeGroup ID type from int to string and add migration
Refactored AgeGroupController, AgeGroupService, and IAgeGroupService to use string IDs instead of int. Added initial Entity Framework migration and database files to support AltersGruppe with string primary key.
This commit is contained in:
@@ -24,7 +24,7 @@ namespace API.Controllers
|
||||
}
|
||||
|
||||
[HttpGet("{id}")]
|
||||
public async Task<IActionResult> GetOne([FromRoute] int id)
|
||||
public async Task<IActionResult> GetOne([FromRoute] string id)
|
||||
{
|
||||
var group = await _ageGroupService.GetAsync(id);
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace API.Controllers
|
||||
}
|
||||
|
||||
[HttpPut("{id}")]
|
||||
public async Task<IActionResult> Update([FromRoute] int id, [FromBody] AltersGruppeIngoing groupDto)
|
||||
public async Task<IActionResult> Update([FromRoute] string id, [FromBody] AltersGruppeIngoing groupDto)
|
||||
{
|
||||
var group = await _ageGroupService.UpdateAsync(id, groupDto.ToInternalFromIngoing());
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace API.Controllers
|
||||
}
|
||||
|
||||
[HttpDelete("{id}")]
|
||||
public async Task<IActionResult> Delete([FromRoute] int Id)
|
||||
public async Task<IActionResult> Delete([FromRoute] string Id)
|
||||
{
|
||||
var group = await _ageGroupService.DeleteAsync(Id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user