public async Task <IActionResult> Create([FromBody] Database.Models.System system) { _logger.LogInformation("Adding {System}", system.Name); _gamesContext.Add(system); await _gamesContext.SaveChangesAsync(); // https://docs.microsoft.com/en-us/aspnet/core/web-api/action-return-types?view=aspnetcore-3.1 // Returns the created object in the body, returns the URL of the created object in a // Location header. Is that normal? return(CreatedAtAction(nameof(Get), new { id = system.SystemId }, system)); }
public void Update(int id, Database.Models.System system) { throw new ArgumentNullException(nameof(Update)); }