예제 #1
0
        public async Task <int> CreateItemType(ItemTypeConfig type)
        {
            int output = (await dbConnection.QueryAsync <int>(@"INSERT INTO itemTypeConfigs(name, description, imagePath, rarity) 
                VALUES(@name, @desc, @url, @rarity) RETURNING id",
                                                              new
            {
                name = type.Name,
                desc = type.Description,
                url = type.ImagePath,
                rarity = type.Rarity
            })).First();

            return(output);
        }
 public InventoryItemDetails(InventoryItem item, ItemTypeConfig itemType)
 {
     this.Item     = item;
     this.ItemType = itemType;
 }