public ActionResult <object> GetAllCars() { try { var JoinedCarsTables = (from CarsType in WebDb.GetCarsType() join CarsInfo in WebDb.GetCarsInfo() on CarsType.CarId equals CarsInfo.CarId into NewList from NewCarsInfo in NewList.DefaultIfEmpty() select new { CarsType.CarId, CarsType.Model, CarsType.Manufacturer, CarsType.ManufacturerYear, CarsType.DayValue, CarsType.LateDayValue, CarsType.GearType, NewCarsInfo.CarType, NewCarsInfo.AvailableForRent, NewCarsInfo.ProperForRent, NewCarsInfo.Picture, NewCarsInfo.CurrectMileage, }).ToList();; return(Ok(JoinedCarsTables)); } catch (Exception ex) { return(NotFound("Couldn't get cars list - error: " + ex.Message)); } }