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:
2025-12-07 20:32:49 +01:00
parent 9128b199e9
commit aacd8b7d96
9 changed files with 133 additions and 9 deletions

View File

@@ -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);