void ShopListArmors() { var count = 1; Console.WriteLine("---Armors For Sale---"); foreach (var armor in ArmorsList.OrderBy(x => x.Name)) { Console.WriteLine($"a{count} {armor.Name}, {armor.OriginalValue}, {armor.ResellValue}"); ItemCatalog.Add($"a{count}", armor); count++; } Console.WriteLine(""); }
void ShopListPotions() { var count = 1; Console.WriteLine("---Potions For Sale---"); foreach (var potion in PotionsList.OrderBy(x => x.Name)) { Console.WriteLine($"p{count} {potion.Name}, {potion.OriginalValue}, {potion.ResellValue}"); ItemCatalog.Add($"p{count}", potion); count++; } Console.WriteLine(""); }
void ShopListWeapons() { var count = 1; Console.WriteLine("---Weapons For Sale---"); foreach (var weapon in WeaponsList.OrderBy(x => x.Name)) { Console.WriteLine($"w{count} {weapon.Name}, {weapon.OriginalValue}, {weapon.ResellValue}"); ItemCatalog.Add($"w{count}", weapon); count++; } Console.WriteLine(""); }
public void ListPotions() { Console.WriteLine("Potions:"); var count = 1; foreach (var potion in PotionsList.OrderBy(p => p.OriginalValue)) { Console.WriteLine($"p{count}. {potion.Name} - Original Value: {potion.OriginalValue}, Resell Value: {potion.ResellValue}"); ItemCatalog.Add($"p{count}", potion); count++; } Console.WriteLine(); }
public void ListArmors() { Console.WriteLine("Armors:"); var count = 1; foreach (var armor in ArmorList.OrderBy(a => a.OriginalValue)) { Console.WriteLine($"a{count}. {armor.Name} - Original Value: {armor.OriginalValue}, Resell Value: {armor.ResellValue}"); ItemCatalog.Add($"a{count}", armor); count++; } Console.WriteLine(); }
public void ListWeapons() { Console.WriteLine("Weapons:"); var count = 1; foreach (var weapon in WeaponsList.OrderBy(w => w.OriginalValue)) { Console.WriteLine($"w{count}. {weapon.Name} - Original Value: {weapon.OriginalValue}, Resell Value: {weapon.ResellValue}"); ItemCatalog.Add($"w{count}", weapon); count++; } Console.WriteLine(); }
public async Task <IActionResult> Create([FromBody] SaveItemJson json) { var catalog = new ItemCatalog(_dbContext, _messageBroker); var item = json.MapTo(new Item { TenantId = User.Claims.TenantId() }); await catalog.Add(item); if (catalog.GroupNotExists) { return(new ItemGroupNotFoundError()); } return(new ItemJson(catalog.Item)); }