public void SaveReview(string comments, string name, string IdTraining, string rating) { int iidTraining = -1; if (!Int32.TryParse(IdTraining, out iidTraining)) { return; } double dRating = -1; if (!double.TryParse(rating, NumberStyles.Any, CultureInfo.InvariantCulture, out dRating)) { return; } var CurrentReview = new Review(); CurrentReview.UserName = name; CurrentReview.Comments = comments; CurrentReview.CarId = iidTraining; CurrentReview.Rating = dRating; _context.Reviews.Add(CurrentReview); _context.SaveChanges(); }
public void AddCar(Car car) { _db.Add(car); _db.SaveChanges(); }
public void AddRepairCar(RepairCar repairCar) { _db.Add(repairCar); _db.SaveChanges(); }
public void AddInvoice(Inventory Invoice) { _db.Add(Invoice); _db.SaveChanges(); }