public JsonResult Create(decimal price, string description, bool?isPublic, int?clientId) { var newPrice = new PricePerHour(price, description, isPublic, clientId); db.PricePerHours.Add(newPrice); db.SaveChanges(); return(Json(newPrice)); }
// GET: Price/Create public ActionResult Create() { var newPrice = new PricePerHour() { Public = true }; return(View(newPrice)); }
public override int GetHashCode() { unchecked { var hashCode = HoursIncluded.GetHashCode(); hashCode = (hashCode * 397) ^ (PricePerHour != null ? PricePerHour.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (OverageRate != null ? OverageRate.GetHashCode() : 0); hashCode = (hashCode * 397) ^ CommitRollover.GetHashCode(); hashCode = (hashCode * 397) ^ (BillingPeriod != null ? BillingPeriod.GetHashCode() : 0); return(hashCode); } }