public async Task <IActionResult> Edit(int id, [Bind("Id,Name")] TypeP typeP) { if (id != typeP.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(typeP); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TypePExists(typeP.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(typeP)); }
public async Task <IActionResult> Create([Bind("Id,Name")] TypeP typeP) { if (ModelState.IsValid) { _context.Add(typeP); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(typeP)); }
public virtual int CompareTo(Expr other) { var pCmp = TypeP.CompareTo(other.TypeP); if (pCmp == 0) { pCmp = TypeS.CompareTo(other.TypeS); if (pCmp == 0) { pCmp = TypeT.CompareTo(other.TypeT); } } return(pCmp); }
public override int GetHashCode() => TypeP.GetHashCode() ^ TypeS.GetHashCode() ^ TypeS.GetHashCode();