void SetChefType() { int choice = Random.Range(0, 3); switch (choice) { case 0: chefType = ChefType.PRODUCTION; type = "Production"; break; case 1: chefType = ChefType.POPULARITY; type = "Popularity"; break; case 2: chefType = ChefType.TECHNOLOGY; type = "Technology"; break; default: Debug.Log("No chef type allocated"); break; } }
public ChefType Create(ChefType model) { _ctx.ChefTypes.Add(model); _ctx.SaveChanges(); return(model); }
public ChefType Update(ChefType model) { var entity = _ctx.ChefTypes.FirstOrDefault(x => x.Id == model.Id); entity.Name = model.Name; _ctx.SaveChanges(); return(model); }
public void SetType(ChefType newType) { chefType = newType; }