コード例 #1
0
        public bool CanFillOrder(Order order, int fillQuantity)
        {
            Logger.Here().Information("BGN");
            using AccountContext context = accountContextFactory.Create();

            AccountBL account = new AccountBL(context.GetAccountById(order.AccountId));

            if (!account.IsActive)
            {
                Logger.Here().Information("Account is not Active");
                return(false);
            }
            Logger.Here().Information("END");
            return(true);
        }
コード例 #2
0
 public Account GetAccountById(int id)
 {
     return(_accountContext.GetAccountById(id));
 }
コード例 #3
0
            public override async Task <AccountServiceResponse> Handle(GetAccountByIdServiceRequest request)
            {
                var account = await AccountContext.GetAccountById(request.Id);

                return(Mapper.Map <AccountServiceResponse>(account));
            }