public static DraftCard ToData(this DraftCardViewModel viewModel)
 {
     return(new DraftCard()
     {
         ContractSalary = viewModel.WeeklySalary,
         ContractYears = viewModel.ContractLength,
         Round = viewModel.RoundNumber,
         MaxCurrentAbility = viewModel.MaximumAbility,
         MaxAge = viewModel.MaximumAge,
         TeamType = viewModel.TeamType,
         Team = viewModel.Team
     });
 }
        private DraftCardViewModel GenerateBasicDraftCard(int pickNumber, int weeklySalary, int? maxAge = null, TeamType teamType = TeamType.Senior)
        {
            var vm = new DraftCardViewModel(core)
            {
                RoundNumber = pickNumber,
                ContractLength = 5,
                WeeklySalary = weeklySalary,
                TeamType = teamType
            };

            if (maxAge.HasValue)
            {
                vm.MaximumAge = maxAge.Value;
            }

            return vm;
        }