public string RegisterCarRental(RentalRegistration rentalRegistration) { Console.WriteLine("RegisterCarRental"); using (DataClassesRentalDataContext ctx = new DataClassesRentalDataContext()) { Rental rentalToInsert; rentalToInsert = new Rental(); rentalToInsert.CustomerID = rentalRegistration.CustomerID; rentalToInsert.CarID = rentalRegistration.CarID; rentalToInsert.Comments = rentalRegistration.Comments; ctx.Rental.InsertOnSubmit(rentalToInsert); ctx.SubmitChanges(); } return "OK"; }
partial void UpdateRental(Rental instance);
partial void DeleteRental(Rental instance);
partial void InsertRental(Rental instance);