public UserAppModel GetUser(int id) { IReadOnlyRepository <DtoUser> readOnlyRepository = repositoryFactory.CreateReadOnlyUsersRepository(); DtoUser user = readOnlyRepository.Get(id); AbstractMapper <DtoUser, UserAppModel> mapper = mapperFactory.Create <DtoUser, UserAppModel>(); return(mapper.Map(user)); }
public IList <UserAppModel> GetUsers(SearchRule[] search_rules, OrderingRule[] ordering_rules) { IReadOnlyRepository <DtoUser> readOnlyRepository = repositoryFactory.CreateReadOnlyUsersRepository(); IEnumerable <DtoUser> users = readOnlyRepository.Get(search_rules, ordering_rules); AbstractMapper <DtoUser, UserAppModel> mapper = mapperFactory.Create <DtoUser, UserAppModel>(); return(mapper.Map(users)); }
public IList <UserAppModel> GetAllUsers() { IReadOnlyRepository <DtoUser> readOnlyRepository = repositoryFactory.CreateReadOnlyUsersRepository(); IEnumerable <DtoUser> users = readOnlyRepository.GetAll(); AbstractMapper <DtoUser, UserAppModel> mapper = mapperFactory.Create <DtoUser, UserAppModel>(); return(mapper.Map(users)); }
public UserAppModel DecryptToken(string UUID, string tokenString) { SessionToken sessionToken = tokenGenerator.Decrypt(tokenString); if (sessionToken.IsValid(UUID)) { AbstractMapper <SessionToken, UserAppModel> mapper = mapperFactory.Create <SessionToken, UserAppModel>(); return(mapper.Map(sessionToken)); } ; return(null); }
public CharacterDto GetCharacterById(int characterId) { return(_characterMapper.Map(_getCharacterByIdUseCase.ExecuteWith(characterId))); }