P1_TrevorGraham/MvcStoreApplication/BusinessLogic/BusinessLogic.cs
/// <summary>
/// requests the repository to create a new Admin in the db based on a viewmodel
/// </summary>
/// <param name="adminViewModel"></param>
/// <returns></returns>
requests the repository to create a new Admin in the db based on a viewmodel
requests the repository to create a new Admin in the db based on a viewmodel
public bool CreateNewAdministrator(AdministratorViewModel adminViewModel)
        {
            if (UsernameExists(adminViewModel.Username))
            {
                return false;
            }
            Administrator admin = _mapper.ConvertAdministratorViewModelToAdministrator(adminViewModel);
            return _repository.AttemptAddAdministratorToDb(admin);
        }
public bool CreateNewAdministrator ( AdministratorViewModel adminViewModel ) { if ( UsernameExists ( adminViewModel . Username ) ) { return false ; } Administrator admin = _mapper . ConvertAdministratorViewModelToAdministrator ( adminViewModel ) ; return _repository . AttemptAddAdministratorToDb ( admin ) ; }
requests the repository to create a new Admin in the db based on a viewmodel
requests the repository to create a new Admin in the db based on a viewmodel
None
adminViewModel
AdministratorViewModel
None