Beispiel #1
0
        public IHttpActionResult GetAllUserVehicles([FromBody, Required] ParkingMasterFrontendDTO request)
        {
            VehicleManager _vehicleManager         = new VehicleManager();
            ResponseDTO <List <Vehicle> > response = _vehicleManager.GetAllUserVehicles(request);

            if (response.Data != null)
            {
                return(Ok(response.Data));
            }
            else
            {
                ResponseDTO <HttpStatusCode> statuesResponse = ResponseManager.ConvertErrorToStatus(response.Error);
                return(Content(statuesResponse.Data, statuesResponse.Error));
            }
        }