internal AccountDomainEntity CreateAccount(AccountTypeDomainEntity accountType, IAccountOwner accountOwner, string accountNumber)
        {
            var account = coreContext.New <AccountDomainEntity>()
                          .With(accountType, accountOwner, accountNumber);

            account.Insert();
            return(account);
        }
        private CreditCardDomainEntity CreateCreditCard(decimal limit, int extreDay, int type, string validMonth, string validYear, string securityCode,
                                                        bool isInternetUsageOpen, ICreditCardOwner creditCardOwner)
        {
            var creditCard = coreContext.New <CreditCardDomainEntity>()
                             .With(limit, extreDay, type, validMonth, validYear, securityCode, isInternetUsageOpen, creditCardOwner);

            creditCard.Insert();

            return(creditCard);
        }
        public CreditCardExtreDomainEntity MapToDomainObject(CreditCardExtre entity)
        {
            var domainEntity = coreContext.New <CreditCardExtreDomainEntity>();

            MapToDomainObject(domainEntity, entity);
            return(domainEntity);
        }
        public TransactionDetailDomainEntity CreateTransactionDetail(TransactionDirection transactionDirection)
        {
            string description = ApiUtils.GenerateTransactionDescription(
                transactionDirection, FromTransactionOwner, ToTransactionOwner, Amount);

            if (transactionDirection == TransactionDirection.In)
            {
                return(coreContext.New <TransactionDetailDomainEntity>()
                       .With(description, TransactionDate, this, (ITransactionDetailOwner)FromTransactionOwner, transactionDirection));
            }
            else
            {
                return(coreContext.New <TransactionDetailDomainEntity>()
                       .With(description, TransactionDate, this, (ITransactionDetailOwner)ToTransactionOwner, transactionDirection));
            }
        }
        internal PersonDomainEntity CreatePerson(string firstName, string lastName, string emailAddress, string identityNumber)
        {
            var person = coreContext.New <PersonDomainEntity>()
                         .With(firstName, lastName, emailAddress, identityNumber);

            person.Insert();
            return(person);
        }
        public TransactionStatusDomainEntity MapToDomainObject(TransactionStatus entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var domainEntity = coreContext.New <TransactionStatusDomainEntity>();

            MapToDomainObject(domainEntity, entity);
            return(domainEntity);
        }
Exemple #7
0
        public TransactionTypeDomainEntity MapToDomainObject(TransactionType entity)
        {
            if (entity == null)
            {
                return(null);
            }

            TransactionTypeDomainEntity domainEntity = coreContext.New <TransactionTypeDomainEntity>();

            MapToDomainObject(domainEntity, entity);
            return(domainEntity);
        }
Exemple #8
0
        public PersonDomainEntity MapToDomainObject(Person entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var domainEntity = coreContext.New <PersonDomainEntity>();

            MapToDomainObject(domainEntity, entity);
            return(domainEntity);
        }
        public CompanyDomainEntity MapToDomainObject(Company entity)
        {
            if (entity == null)
            {
                return(null);
            }

            CompanyDomainEntity domainEntity = coreContext.New <CompanyDomainEntity>();

            MapToDomainObject(domainEntity, entity);
            return(domainEntity);
        }
        public CreditCardPaymentDomainEntity MapToDomainObject(CreditCardPayment entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var domaintEntity = coreContext.New <CreditCardPaymentDomainEntity>();

            MapToDomainObject(domaintEntity, entity);
            return(domaintEntity);
        }
Exemple #11
0
        private CompanyDomainEntity CreateCompany(
            string companyName,
            PersonDomainEntity responsablePerson,
            string address,
            string phoneNumber,
            string taxNumber)
        {
            var company = coreContext.New <CompanyDomainEntity>()
                          .With(companyName, responsablePerson, address, phoneNumber, taxNumber);

            company.Insert();
            return(company);
        }
 public Person CreateNewPerson(string name, string email)
 {
     return(coreContext.New <Person>().With(name, email));
 }
Exemple #13
0
 public Car CreateCar(string brandName, double price)
 {
     return(coreContext.New <Car>().With(brandName, price));
 }