public async Task <IActionResult> Replace( Guid id, TeamResourceV1 resource) { var result = await teamsStore.TryReplaceTeamAsync(id, resource.MapUpdatedToDto(DateTimeOffset.UtcNow)); return(result.MatchResult <IActionResult>( NotFound(), NoContent())); }
public async Task <Maybe <Team> > TryReplaceTeamAsync( Guid id, Team team) { if (team == null) { throw new ArgumentNullException(nameof(team)); } var replaced = await inner.TryReplaceTeamAsync(id, team); await replaced .MatchAsync( SetCacheControlResponseAsync, () => { }); return(replaced); }