Exemple #1
0
        public long AddNewTradeAccountNote(TradeAccountNoteCreateEditModel model)
        {
            var dto = _mapper.Map <TradeAccountNote>(model);

            dto.CreatedById = _identityService.GetIdentityId();

            if (!_tradeAccountRepository.IsExistsTradeAccount(dto.TradeAccountId))
            {
                throw new EntityNotFoundException("Trade account does not exists");
            }

            return(_tradeAccountRepository.AddNewTradeAccountNote(dto).Id);
        }
Exemple #2
0
 public IHttpActionResult AddNewTradeAccountNote(TradeAccountNoteCreateEditModel model)
 {
     return(Ok(_tradeAccountService.AddNewTradeAccountNote(model)));
 }