public static void ListDrugs(List <Drug> drugs) { NarkoKartelContext c = new NarkoKartelContext(); Console.WriteLine("Drugs:"); foreach (var drug in drugs) { Console.WriteLine(ConstantStrings.Line); Console.WriteLine($"| {drug.Name} - quantity: {drug.Quantity}"); } Console.WriteLine(ConstantStrings.Line); Console.WriteLine(ConstantStrings.UnderLine); Console.WriteLine(); }
public static void ListBuyers(List <Buyer> buyers) { NarkoKartelContext c = new NarkoKartelContext(); Console.WriteLine("Buyers:"); foreach (var buyer in buyers) { Dealer dealer = c.Dealers.Single(e => e.Id == buyer.DealerId); Console.WriteLine(ConstantStrings.Line); Console.WriteLine($"| {buyer.Nickname} is buying from {dealer.Nickname}"); } Console.WriteLine(ConstantStrings.Line); Console.WriteLine(ConstantStrings.UnderLine); Console.WriteLine(); }
public Commands() { c = new NarkoKartelContext(); money = c.Money.Single(e => e.MoneyKey == ConstantStrings.MoneyKey); }
public Commands(NarkoKartelContext cont) { c = cont; //money = c.Money.Single(e => e.MoneyKey == ConstantStrings.MoneyKey); }