Example #1
0
        static void Main(string[] args)
        {
            var detailController       = new DetailsController();
            var carsController         = new CarsController();
            var manufacturerController = new ManufacturerController();

            var det      = detailController.GetDetails();
            var vehicles = carsController.GetСars();

            var carViewModel = new CarViewModel()
            {
                Id   = 6,
                Name = "PAZIK",
            };

            var hz = detailController.GetDetails();

            var getmanufacturer = manufacturerController.GetAll();

            var getall = manufacturerController.GetCarManufacturerModels();
        }
Example #2
0
        static void Main(string[] args)
        {
            ICarsController    carsController   = new CarsController();
            IDetailsController detailController = new DetailsController();

            var result = from resCar in carsController.GetСars()
                         join resDet in detailController.GetDetails()
                         on resCar.Id equals resDet.Cars_Id
                         select new { CarName = resCar.Name, Car_Id = resCar.Id, DetailName = resDet.Name };

            foreach (var obj in result)
            {
                Console.WriteLine(obj);
            }
            Console.ReadKey();
        }