public async Task <ActionResult> DeleteConfirmed(int id) { LiquorType liquorType = await db.LiquorTypes.FindAsync(id); db.LiquorTypes.Remove(liquorType); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "Id_liquorType,Descripcion")] LiquorType liquorType) { if (ModelState.IsValid) { db.Entry(liquorType).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(liquorType)); }
public async Task <ActionResult> Create([Bind(Include = "Id_liquorType,Descripcion")] LiquorType liquorType) { if (ModelState.IsValid) { db.LiquorTypes.Add(liquorType); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(liquorType)); }
// GET: LiquorTypes/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } LiquorType liquorType = await db.LiquorTypes.FindAsync(id); if (liquorType == null) { return(HttpNotFound()); } return(View(liquorType)); }
public Liquor(IBeverage beverage, LiquorType liquorType) : base(beverage) { _type = liquorType; }
/// <summary> /// Цена - 50 /// </summary> public static IBeverage AddLiquor(this IBeverage beverage, LiquorType liquorType) { return(new Liquor(beverage, liquorType)); }
public Liquor(LiquorType typeOfLiquor) { _typeOfLiquor = typeOfLiquor; }
public Liqour(IBeverage beverage, LiquorType type) : base(beverage) { _type = type; }