Esempio n. 1
0
        public CFamily GetFamilyByPersonId(int personId)
        {
            IFamilyRepository familyRep = CSRepositoryFactory.GetFamilyRepository();
            CFamilyDto        familyDto = familyRep.FindByPersonIdFullLoad(personId);

            CDalToBllConverter converter = new CDalToBllConverter();

            return(converter.ConvertFamily(familyDto));
        }
Esempio n. 2
0
        public CPerson GetPersonById(int personId)
        {
            IPersonRepository personRepository = CSRepositoryFactory.GetPersonRepository();
            CPersonDto        personDal        = personRepository.FindItemByKeyFullLoad(personId);

            CDalToBllConverter converter = new CDalToBllConverter();

            return(converter.ConvertPerson(personDal));
        }
Esempio n. 3
0
        public CLoginData FindLoginByUsernameOrEmail(String username)
        {
            ILoginRepository loginRepository = CSRepositoryFactory.GetLoginRepository();

            CLoginDataDto loginDto = loginRepository.FindLoginDataByUsername(username);

            if (loginDto == null)
            {
                loginDto = loginRepository.FindLoginDataByEmail(username);
            }

            if (loginDto == null)
            {
                return(null);
            }

            CDalToBllConverter converter = new CDalToBllConverter();

            return(converter.ConvertLogin(loginDto));
        }