public DealerViewModel GetDealer(int DealerId) { var DealerFromDb = _DealerRepository.GetDealer(DealerId); var DealerViewModel = mapper.Map <Dealer, DealerViewModel>(DealerFromDb); return(DealerViewModel); }
public bool UpdateDealer(string email) { CMS_DealerInfo dealerInfo = _dealerRepository.GetDealer(email); dealerInfo.IsActive = true; bool status = _dealerRepository.UpdateDealer(dealerInfo); return(status); }
public IActionResult Get([FromODataUri] int businessEntityId) { try { var dealer = _dealerRepository.GetDealer(businessEntityId); if (dealer == null) { return(NotFound()); } var result = Mapper.Map <DealerDto>(dealer); return(Ok(result)); } catch (Exception ex) { _logger.LogError($"Failed in Get /Dealers(businessEntityId): {ex}"); return(BadRequest()); } }
public Dealer GetDealer(int id) { return(_dealerRepository.GetDealer(id)); }