week3/RpsFollowAlong/BusinessLogic/BusinessLogic.cs
/// <summary>
/// takes a LoginPlayerView model instance and retunrs a PlayerViewModel instance
/// </summary>
/// <param name=""></param>
/// <returns></returns>
takes a LoginPlayerView model instance and retunrs a PlayerViewModel instance
takes a LoginPlayerView model instance and retunrs a PlayerViewModel instance
public PlayerViewModel LoginPlayer(LoginPlayerViewModel loginPlayerViewModel)
        {
            Player player = new Player()
            {
                Fname = loginPlayerViewModel.Fname,
                Lname = loginPlayerViewModel.Lname
            };
            Player player1 = _repository.LoginPlayer(player);
            PlayerViewModel playerViewModel = _mapper.ConvertPlayerToPlayerViewModel(player1);
            return playerViewModel;
        }
public PlayerViewModel LoginPlayer ( LoginPlayerViewModel loginPlayerViewModel ) { Player player = new Player ( ) { Fname = loginPlayerViewModel . Fname , Lname = loginPlayerViewModel . Lname } ; Player player1 = _repository . LoginPlayer ( player ) ; PlayerViewModel playerViewModel = _mapper . ConvertPlayerToPlayerViewModel ( player1 ) ; return playerViewModel ; }
takes a LoginPlayerView model instance and retunrs a PlayerViewModel instance
takes a LoginPlayerView model instance and retunrs a PlayerViewModel instance
//have all logic confined to this business layer //convert Player to PlayerViewModel
None
loginPlayerViewModel
LoginPlayerViewModel
None