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); }
public Account GetAccountById(int id) { return(_accountContext.GetAccountById(id)); }
public override async Task <AccountServiceResponse> Handle(GetAccountByIdServiceRequest request) { var account = await AccountContext.GetAccountById(request.Id); return(Mapper.Map <AccountServiceResponse>(account)); }