コード例 #1
0
        private void CreateTestData()
        {
            var account = new Core.Account();

            account.FirstName = "Scott";
            account.LastName  = "Alzheimer";
            account.UserName  = "******";
            account.Password  = "******";

            Data.Interfaces.IAccountRepository repo = new Data.Repositories.AccountRepository();
            repo.Create(account, OptionsBuilder);

            CreatePaymentTypes();
            CreateCategories();
        }
コード例 #2
0
        public string CreateAccount(Core.Account account)
        {
            //validate if in memory db has been started
            if (OptionsBuilder == null)
            {
                return("Service not started");
            }
            IAccountRepository repo = new AccountRepository();

            var success = repo.Create(account, OptionsBuilder);

            if (success == 1)
            {
                return(string.Format("Account for user {0} was created successfully", account.UserName));
            }
            else
            {
                return(string.Format("Account creation for user {0} failed", account.UserName));
            }
        }