public async Task <LeaderBoard> AddAsync( LeaderBoard leaderBoard) { var leaderBoardContainer = _cosmosDatabase.Containers["leaderboards"]; var leaderBoardDocument = await leaderBoardContainer.Items.CreateItemAsync <LeaderBoard>( leaderBoard.Id.ToString(), leaderBoard); return(leaderBoardDocument.Resource); }
public async Task <LeaderBoard> UpdateByIdAsync( Guid id, LeaderBoard leaderBoard) { var leaderBoardContainer = _cosmosDatabase.Containers["leaderboards"]; var leaderBoardDocument = await leaderBoardContainer.Items.ReplaceItemAsync <LeaderBoard>( id.ToString(), id.ToString(), leaderBoard); return(leaderBoardDocument.Resource); }
public LearnerLeaderBoard( LeaderBoard leaderBoard) { this.Id = leaderBoard.Id; this.Name = leaderBoard.Name; }