示例#1
0
        public BankingController()
        {
            //IAccountRepository accountRepository = new AccountRepository();
            IAccountRepository accountRepository = new AccountRepositoryInMem();
            IGuildService      guildService      = new GuildService();

            _accountUseCase = new AccountUseCases(accountRepository, guildService);
        }
示例#2
0
        public static async Task <GrpcStatusResponse> AddAccount(GrpcAddAccountReq grpcRequest)
        {
            try
            {
                var request = GrpcAddAccountReqAdapter.Adapt(grpcRequest);
                await AccountUseCases.Create(request).Execute();

                return(new GrpcStatusResponse()
                {
                    Ok = true
                });
            }
            catch (Exception)
            {
                throw;
            }
        }