Exemplo n.º 1
0
        public ModalDetails GetModal(string modalId)
        {
            var modal = _modalService.Details(modalId);

            if (modal == null)
            {
                return(null);
            }

            var modalDetail = Mapper.Map <Modal, ModalDetails>(modal);

            var gps = _gpsService.GetModalGps(modalId);

            modalDetail.Gps = new ModalGps()
            {
                Latitude  = gps.Latitude,
                Longitude = gps.Longitude,
                Direction = gps.Direction.ToString()
            };

            return(modalDetail);
        }