public List <PaymentEventDto> GetPaymentEventsForCustomer(int customerID) { var payments = _paymentEventRepository.GetPaymentEventsForCustomer(customerID); if (payments == null) { return(null); } return(payments.Select(x => _dtoCreator.Create(x)).ToList()); }
public OperationDto GetOperationById(int operationId) { Operation operation = _repository.Get <Operation>(operationId); if (operation != null) { return(_operationCreator.Create(operation)); } return(null); }
public AdvisorDto GetAdvisorById(int id) { Advisor advisor = _repository.Get <Advisor>(id); if (advisor != null) { return(_advisorDtoCreator.Create(advisor)); } return(null); }
public IList <TagDepensesDto> GetTagDepensesForProfile(int profileId) { CustomerProfile profile = _repository.Load <CustomerProfile>(profileId); if (profile.TagsRepartition != null) { return(profile.TagsRepartition.Select(x => _dtoCreator.Create(x)).ToList()); } return(null); }
public CustomerDto GetCustomerById(int id) { var customer = _repository.Get <Customer>(id); if (customer == null) { return(null); } return(_customerDtoCreator.Create(customer)); }
public List <Dto.BusinessPartnerDto> GetBusinessPartnerForCustomer(int customerID) { var customer = _repository.Load <Customer>(customerID); if (customer != null && customer.Partners != null) { return(customer.Partners.Select(x => _dtoCreator.Create(x)).ToList()); } return(null); }
public IList <AccountDto> GetCustomerAccounts(int customer) { var accounts = _accountRepository.GetAccountsByCustomer(customer); if (accounts != null) { return(accounts.Select(x => _accountDtoCreator.Create(x)).ToList()); } return(null); }
public IList <CustomerProfileDto> GetAllCustomerProfiles() { var profiles = _repository.GetAll <CustomerProfile>(); if (profiles != null) { return(profiles.Select(x => _dtoCreator.Create(x)).ToList()); } return(null); }
public IList <TagDto> GetTagsForCustomer(int customerID) { var tags = _tagRepository.GetTagsForCustomer(customerID); if (tags != null) { return(tags.Select(x => _tagDtoCreator.Create(x)).ToList()); } return(null); }
public UserIdentityDto AuthenticateUser(string identity, string password) { Customer customer = _customerRepository.GetCustomerByIdentity(identity); if (customer != null) { String passwordHash = _hashProvider.Hash(password + customer.PasswordSalt); if (customer.Password == passwordHash) { return(_userIdentityDtoCreator.Create(customer)); } } return(null); }