public Task <Models.Parking> CreateParking(Models.Parking parking) { Infrastracture.Entities.Parking parkingTable = new Infrastracture.Entities.Parking(); // parkingTable.Pid = 1; parkingTable.Date = parking.Fromdate; parkingTable.NumberOfslots = 10; parkingTable.BookedSlots = 1; parkingTable.Cars.Add(new Infrastracture.Entities.Car() { // Cid = 1, //CarNumber = "ap07", //Fromdate = DateTime.UtcNow, //Todate=DateTime.UtcNow, // Pid= parkingTable.Pid }); var results = _parkingRepository.CreateParking(parkingTable); return(null); }