public static Player ConvertToPlayer(FavoritePlayer player) { return(new Player { PlayerId = player.PlayerId, FirstName = player.FirstName, LastName = player.LastName, AgeAtRankDate = player.AgeAtRankDate, CountryName = player.CountryName, IsTie = player.IsTie, LastWeekPosMove = player.LastWeekPosMove, NatlId = player.NatlId, NbrEventsPlayed = player.NbrEventsPlayed, NextBestPoints = player.NextBestPoints, PlayerGladiatorImageCmsUrl = player.PlayerGladiatorImageCmsUrl, PlayerHeadshotImageCmsUrl = player.PlayerHeadshotImageCmsUrl, Points = player.Points, PointsDropping = player.PointsDropping, PrevPoints = player.PrevPoints, PrevRank = player.PrevRank, Rank = player.Rank, Type = player.Type, IsFavorite = true }); }
public Task <bool> ConnectFavoritePlayerToUserAsync(FavoritePlayer favoritePlayer) { _dbContext.FavoritePlayers.Add(favoritePlayer); return(CommitedResultIsSuccessfulAsync()); }