diff --git a/src/EntityFramework_LoL/Sources/ApiLol/Mapper/ChampionMapper.cs b/src/EntityFramework_LoL/Sources/ApiLol/Mapper/ChampionMapper.cs index 094739d..7450581 100644 --- a/src/EntityFramework_LoL/Sources/ApiLol/Mapper/ChampionMapper.cs +++ b/src/EntityFramework_LoL/Sources/ApiLol/Mapper/ChampionMapper.cs @@ -6,8 +6,7 @@ namespace ApiLol.Mapper public static class ChampionMapper { public static ChampionDto ToDto(this Champion champion) - { - return new ChampionDto() + => new() { Name = champion.Name, Bio = champion.Bio, @@ -17,12 +16,12 @@ namespace ApiLol.Mapper Skins = champion.Skins.Select(e => e.ToDto()), Skills = champion.Skills.Select(e => e.ToDto()) }; - } + public static Champion ToModel(this ChampionDto championDto) { var champ = new Champion(championDto.Name, championDto.Class.ToModel(), championDto.Icon, championDto.Image.Base64, championDto.Bio); - foreach(var skin in championDto.Skins) + foreach (var skin in championDto.Skins) { champ.AddSkin(skin.ToModel(champ)); } diff --git a/src/EntityFramework_LoL/Sources/ApiLol/Mapper/LargeImageMapper.cs b/src/EntityFramework_LoL/Sources/ApiLol/Mapper/LargeImageMapper.cs index 6bebb6f..a0b8756 100644 --- a/src/EntityFramework_LoL/Sources/ApiLol/Mapper/LargeImageMapper.cs +++ b/src/EntityFramework_LoL/Sources/ApiLol/Mapper/LargeImageMapper.cs @@ -6,16 +6,9 @@ namespace ApiLol.Mapper public static class LargeImageMapper { public static LargeImageDto ToDto(this LargeImage largeImage) - { - return new LargeImageDto() - { - Base64 = largeImage.Base64 - }; - } + => new() { Base64 = largeImage.Base64 }; + + public static LargeImage ToModel(this LargeImageDto largeImageDto) => new(largeImageDto.Base64); - public static LargeImage ToModel(this LargeImageDto largeImageDto) - { - return new LargeImage(largeImageDto.Base64); - } } } \ No newline at end of file diff --git a/src/EntityFramework_LoL/Sources/ApiLol/Mapper/RuneMapper.cs b/src/EntityFramework_LoL/Sources/ApiLol/Mapper/RuneMapper.cs index af4640e..b11f1aa 100644 --- a/src/EntityFramework_LoL/Sources/ApiLol/Mapper/RuneMapper.cs +++ b/src/EntityFramework_LoL/Sources/ApiLol/Mapper/RuneMapper.cs @@ -7,8 +7,7 @@ namespace ApiLol.Mapper public static class RuneMapper { public static RuneDto ToDto(this Rune rune) - { - return new RuneDto() + => new() { Name = rune.Name, Description = rune.Description, @@ -16,11 +15,8 @@ namespace ApiLol.Mapper Icon = rune.Icon, Image = rune.Image.ToDto() }; - } - public static Rune ToModel(this RuneDto rune) - { - return new Rune(rune.Name, rune.Family.ToModel(), rune.Icon, rune.Image.Base64, rune.Description); - } + public static Rune ToModel(this RuneDto rune) => new(rune.Name, rune.Family.ToModel(), rune.Icon, rune.Image.Base64, rune.Description); + } } diff --git a/src/EntityFramework_LoL/Sources/ApiLol/Mapper/SkillMapper.cs b/src/EntityFramework_LoL/Sources/ApiLol/Mapper/SkillMapper.cs index 20c0787..27bb55b 100644 --- a/src/EntityFramework_LoL/Sources/ApiLol/Mapper/SkillMapper.cs +++ b/src/EntityFramework_LoL/Sources/ApiLol/Mapper/SkillMapper.cs @@ -6,18 +6,14 @@ namespace ApiLol.Mapper public static class SkillMapper { public static SkillDto ToDto(this Skill skill) - { - return new SkillDto() + => new() { Name = skill.Name, Description = skill.Description, Type = skill.Type.ToDto() }; - } - public static Skill ToModel(this SkillDto skillDto) - { - return new Skill(skillDto.Name, skillDto.Type.ToModel(), skillDto.Description); - } + public static Skill ToModel(this SkillDto skillDto) => new(skillDto.Name, skillDto.Type.ToModel(), skillDto.Description); + } } diff --git a/src/EntityFramework_LoL/Sources/ApiLol/Mapper/SkinMapper.cs b/src/EntityFramework_LoL/Sources/ApiLol/Mapper/SkinMapper.cs index 776209e..d4d7221 100644 --- a/src/EntityFramework_LoL/Sources/ApiLol/Mapper/SkinMapper.cs +++ b/src/EntityFramework_LoL/Sources/ApiLol/Mapper/SkinMapper.cs @@ -6,8 +6,7 @@ namespace ApiLol.Mapper public static class SkinMapper { public static SkinDto ToDto(this Skin skin) - { - return new SkinDto() + => new() { Name = skin.Name, Description = skin.Description, @@ -15,11 +14,9 @@ namespace ApiLol.Mapper Image = skin.Image.ToDto(), Price = skin.Price }; - } public static SkinDtoC ToDtoC(this Skin skin) - { - return new SkinDtoC() + => new() { Name = skin.Name, Description = skin.Description, @@ -28,17 +25,10 @@ namespace ApiLol.Mapper Price = skin.Price, ChampionName = skin.Champion.Name }; - } - public static Skin ToModel(this SkinDto skinDto, Champion champ) - { - return new Skin(skinDto.Name, champ, skinDto.Price, skinDto.Icon, skinDto.Image.Base64, skinDto.Description); - } + public static Skin ToModel(this SkinDto skinDto, Champion champ) => new(skinDto.Name, champ, skinDto.Price, skinDto.Icon, skinDto.Image.Base64, skinDto.Description); - public static Skin ToModelC(this SkinDtoC skinDto, Champion champ) - { - return new Skin(skinDto.Name, champ, skinDto.Price, skinDto.Icon, skinDto.Image.Base64, skinDto.Description); - } + public static Skin ToModelC(this SkinDtoC skinDto, Champion champ) => new(skinDto.Name, champ, skinDto.Price, skinDto.Icon, skinDto.Image.Base64, skinDto.Description); } } \ No newline at end of file diff --git a/src/EntityFramework_LoL/Sources/DbManager/Mapper/ChampionMapper.cs b/src/EntityFramework_LoL/Sources/DbManager/Mapper/ChampionMapper.cs new file mode 100644 index 0000000..454bc54 --- /dev/null +++ b/src/EntityFramework_LoL/Sources/DbManager/Mapper/ChampionMapper.cs @@ -0,0 +1,43 @@ +using DbManager.Mapper.enums; +using Model; +using MyFlib; + +namespace DbManager.Mapper +{ + public static class ChampionMapper + { + public static Champion ToModel(this ChampionEntity championEntity) + { + Champion champion = new (championEntity.Name, championEntity.Class.ToModel(), championEntity.Icon, championEntity.Image.Base64.ToString(), championEntity.Bio); + foreach (var skill in championEntity.Skills) + { + champion.AddSkill(skill.ToModel()); + } + foreach (var skin in championEntity.Skins) + { + champion.AddSkin(skin.ToModel()); + } + return champion; + } + + public static ChampionEntity ToEntity(this Champion champion, LolDbContext context) + { + var champ = new ChampionEntity() + { + Name = champion.Name, + Icon = champion.Icon, + Bio = champion.Bio, + Image = champion.Image.ToEntity(), + }; + foreach (var skill in champion.Skills) + { + champ.Skills.Add(skill.ToEntity(champ)); + } + foreach (var skin in champion.Skins) + { + champ.Skins.Add(skin.ToEntity(context)); + } + return champ; + } + } +} diff --git a/src/EntityFramework_LoL/Sources/DbManager/Mapper/LargeImageMapper.cs b/src/EntityFramework_LoL/Sources/DbManager/Mapper/LargeImageMapper.cs new file mode 100644 index 0000000..594c0b6 --- /dev/null +++ b/src/EntityFramework_LoL/Sources/DbManager/Mapper/LargeImageMapper.cs @@ -0,0 +1,13 @@ +using Model; +using MyFlib; + +namespace DbManager.Mapper +{ + public static class LargeImageMapper + { + public static LargeImage ToModel(this LargeImageEntity largeImage) => new(largeImage.Base64); + + public static LargeImageEntity ToEntity(this LargeImage largeImage) => new() { Base64 = largeImage.Base64 }; + + } +} diff --git a/src/EntityFramework_LoL/Sources/DbManager/Mapper/RuneMapper.cs b/src/EntityFramework_LoL/Sources/DbManager/Mapper/RuneMapper.cs new file mode 100644 index 0000000..788ce1e --- /dev/null +++ b/src/EntityFramework_LoL/Sources/DbManager/Mapper/RuneMapper.cs @@ -0,0 +1,21 @@ +using DbManager.Mapper.enums; +using Model; +using MyFlib; + +namespace DbManager.Mapper +{ + public static class RuneMapper + { + public static Rune ToModel(this RuneEntity rune) => new(rune.Name, rune.Family.ToModel(), rune.Icon, rune.Image.Base64, rune.Description); + public static RuneEntity ToEntity(this Rune rune) + => new() + { + Name = rune.Name, + Description = rune.Description, + Family = rune.Family.ToEntity(), + Icon = rune.Icon, + Image = rune.Image.ToEntity() + }; + + } +} diff --git a/src/EntityFramework_LoL/Sources/DbManager/Mapper/RunePageMapper.cs b/src/EntityFramework_LoL/Sources/DbManager/Mapper/RunePageMapper.cs new file mode 100644 index 0000000..839ba0e --- /dev/null +++ b/src/EntityFramework_LoL/Sources/DbManager/Mapper/RunePageMapper.cs @@ -0,0 +1,24 @@ +using DbManager.Mapper.enums; +using Model; +using MyFlib; +using MyFlib.Entities; + +namespace DbManager.Mapper +{ + public static class RunePageMapper + { + public static RunePage ToModel(this RunePageEntity runePageEntity, LolDbContext context) + { + RunePage runePage = new(runePageEntity.Name); + foreach (var d in runePageEntity.DictionaryCategoryRunes) + { + var rune = context.Runes.Find(d.RuneName); + if (rune!=null) + { + runePage[d.category.ToModel()] = rune.ToModel(); + } + } + return runePage; + } + } +} diff --git a/src/EntityFramework_LoL/Sources/DbManager/Mapper/SkillMapper.cs b/src/EntityFramework_LoL/Sources/DbManager/Mapper/SkillMapper.cs new file mode 100644 index 0000000..9e8b636 --- /dev/null +++ b/src/EntityFramework_LoL/Sources/DbManager/Mapper/SkillMapper.cs @@ -0,0 +1,24 @@ +using DbManager.Mapper.enums; +using Model; +using MyFlib; + +namespace DbManager.Mapper +{ + public static class SkillMapper + { + public static Skill ToModel(this SkillEntity skillEntity) => new(skillEntity.Name, skillEntity.Type.ToModel(), skillEntity.Description); + + + public static SkillEntity ToEntity(this Skill skill, ChampionEntity championEntity) + { + return new() + { + Name = skill.Name, + Description = skill.Description, + Type = skill.Type.ToEntity(), + Champion = championEntity + }; + } + + } +} diff --git a/src/EntityFramework_LoL/Sources/DbManager/Mapper/SkinMapper.cs b/src/EntityFramework_LoL/Sources/DbManager/Mapper/SkinMapper.cs new file mode 100644 index 0000000..391891f --- /dev/null +++ b/src/EntityFramework_LoL/Sources/DbManager/Mapper/SkinMapper.cs @@ -0,0 +1,22 @@ +using Model; +using MyFlib; + +namespace DbManager.Mapper +{ + public static class SkinMapper + { + public static Skin ToModel(this SkinEntity skinEntity) + => new(skinEntity.Name, skinEntity.Champion.ToModel(), skinEntity.Price, skinEntity.Icon, skinEntity.Image.Base64, skinEntity.Description); + + public static SkinEntity ToEntity(this Skin skin, LolDbContext context) + => new() + { + Name = skin.Name, + Description = skin.Description, + Icon = skin.Icon, + Price = skin.Price, + Champion = context.Champions.Find(skin.Champion.Name), + Image = skin.Image.ToEntity() + }; + } +} diff --git a/src/EntityFramework_LoL/Sources/DbManager/Mapper/enums/CategoryMapper.cs b/src/EntityFramework_LoL/Sources/DbManager/Mapper/enums/CategoryMapper.cs new file mode 100644 index 0000000..6b4c872 --- /dev/null +++ b/src/EntityFramework_LoL/Sources/DbManager/Mapper/enums/CategoryMapper.cs @@ -0,0 +1,50 @@ +using Model; +using MyFlib.Entities.enums; + +namespace DbManager.Mapper.enums +{ + public static class CategoryMapper + { + public static RunePage.Category ToModel(this CategoryEntity category) + { + switch (category) + { + case CategoryEntity.Major: + return RunePage.Category.Major; + case CategoryEntity.Minor1: + return RunePage.Category.Minor1; + case CategoryEntity.Minor2: + return RunePage.Category.Minor2; + case CategoryEntity.Minor3: + return RunePage.Category.Minor3; + case CategoryEntity.OtherMinor1: + return RunePage.Category.OtherMinor1; + case CategoryEntity.OtherMinor2: + return RunePage.Category.OtherMinor2; + default: + return RunePage.Category.Major; + } + } + + public static CategoryEntity ToEntity(this RunePage.Category category) + { + switch (category) + { + case RunePage.Category.Major: + return CategoryEntity.Major; + case RunePage.Category.Minor1: + return CategoryEntity.Minor1; + case RunePage.Category.Minor2: + return CategoryEntity.Minor2; + case RunePage.Category.Minor3: + return CategoryEntity.Minor3; + case RunePage.Category.OtherMinor1: + return CategoryEntity.OtherMinor1; + case RunePage.Category.OtherMinor2: + return CategoryEntity.OtherMinor2; + default: + return CategoryEntity.Major; + } + } + } +} diff --git a/src/EntityFramework_LoL/Sources/DbManager/Mapper/enums/ChampionClassMapper.cs b/src/EntityFramework_LoL/Sources/DbManager/Mapper/enums/ChampionClassMapper.cs new file mode 100644 index 0000000..a1948a8 --- /dev/null +++ b/src/EntityFramework_LoL/Sources/DbManager/Mapper/enums/ChampionClassMapper.cs @@ -0,0 +1,55 @@ +using Model; +using MyFlib; + +namespace DbManager.Mapper.enums +{ + public static class ChampionClassMapper + { + public static ChampionClass ToModel(this ChampionClassEntity championClass) + { + switch (championClass) + { + case ChampionClassEntity.Unknown: + return ChampionClass.Unknown; + case ChampionClassEntity.Assassin: + return ChampionClass.Assassin; + case ChampionClassEntity.Fighter: + return ChampionClass.Fighter; + case ChampionClassEntity.Mage: + return ChampionClass.Mage; + case ChampionClassEntity.Marksman: + return ChampionClass.Marksman; + case ChampionClassEntity.Support: + return ChampionClass.Support; + case ChampionClassEntity.Tank: + return ChampionClass.Tank; + default: + return ChampionClass.Unknown; + } + } + + public static ChampionClassEntity ToEntity(this ChampionClass championClass) + { + switch (championClass) + { + case ChampionClass.Unknown: + return ChampionClassEntity.Unknown; + case ChampionClass.Assassin: + return ChampionClassEntity.Assassin; + case ChampionClass.Fighter: + return ChampionClassEntity.Fighter; + case ChampionClass.Mage: + return ChampionClassEntity.Mage; + case ChampionClass.Marksman: + return ChampionClassEntity.Marksman; + case ChampionClass.Support: + return ChampionClassEntity.Support; + case ChampionClass.Tank: + return ChampionClassEntity.Tank; + default: + return ChampionClassEntity.Unknown; + } + } + + } +} diff --git a/src/EntityFramework_LoL/Sources/DbManager/Mapper/enums/RuneFamilyMapper.cs b/src/EntityFramework_LoL/Sources/DbManager/Mapper/enums/RuneFamilyMapper.cs new file mode 100644 index 0000000..c593f34 --- /dev/null +++ b/src/EntityFramework_LoL/Sources/DbManager/Mapper/enums/RuneFamilyMapper.cs @@ -0,0 +1,43 @@ +using Model; +using MyFlib.Entities.enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DbManager.Mapper.enums +{ + public static class RuneFamilyMapper + { + public static RuneFamily ToModel(this RuneFamilyEntity runeFamily) + { + switch (runeFamily) + { + case RuneFamilyEntity.Unknown: + return RuneFamily.Unknown; + case RuneFamilyEntity.Precision: + return RuneFamily.Precision; + case RuneFamilyEntity.Domination: + return RuneFamily.Domination; + default: + return RuneFamily.Unknown; + } + } + + public static RuneFamilyEntity ToEntity(this RuneFamily runeFamily) + { + switch (runeFamily) + { + case RuneFamily.Unknown: + return RuneFamilyEntity.Unknown; + case RuneFamily.Precision: + return RuneFamilyEntity.Precision; + case RuneFamily.Domination: + return RuneFamilyEntity.Domination; + default: + return RuneFamilyEntity.Unknown; + } + } + } +} diff --git a/src/EntityFramework_LoL/Sources/DbManager/Mapper/enums/SkillTypeMapper.cs b/src/EntityFramework_LoL/Sources/DbManager/Mapper/enums/SkillTypeMapper.cs new file mode 100644 index 0000000..f3969e6 --- /dev/null +++ b/src/EntityFramework_LoL/Sources/DbManager/Mapper/enums/SkillTypeMapper.cs @@ -0,0 +1,42 @@ +using Model; +using MyFlib; + +namespace DbManager.Mapper.enums +{ + public static class SkillTypeMapper + { + public static SkillType ToModel(this SkillTypeEntity skillTypeEntity) + { + switch (skillTypeEntity) + { + case SkillTypeEntity.Unknown: + return SkillType.Unknown; + case SkillTypeEntity.Basic: + return SkillType.Basic; + case SkillTypeEntity.Passive: + return SkillType.Passive; + case SkillTypeEntity.Ultimate: + return SkillType.Ultimate; + default: + return SkillType.Unknown; + } + } + public static SkillTypeEntity ToEntity(this SkillType skillType) + { + switch (skillType) + { + case SkillType.Unknown: + return SkillTypeEntity.Unknown; + case SkillType.Basic: + return SkillTypeEntity.Basic; + case SkillType.Passive: + return SkillTypeEntity.Passive; + case SkillType.Ultimate: + return SkillTypeEntity.Ultimate; + default: + return SkillTypeEntity.Unknown; + } + + } + } +} diff --git a/src/EntityFramework_LoL/Sources/MyFlib/DataBase.db b/src/EntityFramework_LoL/Sources/MyFlib/DataBase.db index 59a1e39..298aaff 100644 Binary files a/src/EntityFramework_LoL/Sources/MyFlib/DataBase.db and b/src/EntityFramework_LoL/Sources/MyFlib/DataBase.db differ diff --git a/src/EntityFramework_LoL/Sources/MyFlib/DataSeeder.cs b/src/EntityFramework_LoL/Sources/MyFlib/DataSeeder.cs index 12b19ca..b3ba905 100644 --- a/src/EntityFramework_LoL/Sources/MyFlib/DataSeeder.cs +++ b/src/EntityFramework_LoL/Sources/MyFlib/DataSeeder.cs @@ -29,8 +29,8 @@ namespace MyFlib context.AddRange(yasuoTempest, LuxFinal); // Runes - RuneEntity conqueror = new RuneEntity { Name = "Conqueror", Description = "by dealing damage to an enemy champion, you accumulate stacks that, once fully stacked, increase your damage and provide you with healing.", Family = RuneFamilyEntity.Unknown, ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; - RuneEntity ravenousHunter = new RuneEntity { Name = "Ravenous Hunter", Description = "killing minions, monsters, or enemy champions grants you stacks of Ravenous Hunter, which increase your damage against enemy champions and provide you with healing.", Family = RuneFamilyEntity.Domination, ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; + RuneEntity conqueror = new RuneEntity { Name = "Conqueror", Description = "by dealing damage to an enemy champion, you accumulate stacks that, once fully stacked, increase your damage and provide you with healing.", Family = RuneFamilyEntity.Unknown, Icon = "", ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; + RuneEntity ravenousHunter = new RuneEntity { Name = "Ravenous Hunter", Description = "killing minions, monsters, or enemy champions grants you stacks of Ravenous Hunter, which increase your damage against enemy champions and provide you with healing.", Family = RuneFamilyEntity.Domination, Icon = "", ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; context.AddRange(conqueror, ravenousHunter); diff --git a/src/EntityFramework_LoL/Sources/MyFlib/Entities/RuneEntity.cs b/src/EntityFramework_LoL/Sources/MyFlib/Entities/RuneEntity.cs index 5e4c249..9c6683f 100644 --- a/src/EntityFramework_LoL/Sources/MyFlib/Entities/RuneEntity.cs +++ b/src/EntityFramework_LoL/Sources/MyFlib/Entities/RuneEntity.cs @@ -16,6 +16,7 @@ namespace MyFlib [Required] public RuneFamilyEntity Family { get; set; } public ICollection DictionaryCategoryRunes { get; set; } + public string Icon { get; set; } public LargeImageEntity Image { get; set; } [ForeignKey("Image")] diff --git a/src/EntityFramework_LoL/Sources/MyFlib/LolDbContext.cs b/src/EntityFramework_LoL/Sources/MyFlib/LolDbContext.cs index 971d018..e680eb9 100644 --- a/src/EntityFramework_LoL/Sources/MyFlib/LolDbContext.cs +++ b/src/EntityFramework_LoL/Sources/MyFlib/LolDbContext.cs @@ -73,8 +73,8 @@ namespace MyFlib ); //RuneEntity - RuneEntity runeHextech = new RuneEntity { Name = "Hextech Flashtraption ", Description = "While Flash is on cooldown, it is replaced by Hexflash.", Family = RuneFamilyEntity.Unknown, ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; - RuneEntity runeManaflow = new RuneEntity { Name = "Manaflow Band ", Description = "Hitting enemy champions with a spell grants 25 maximum mana, up to 250 mana.", Family = RuneFamilyEntity.Domination, ImageId = Guid.Parse("{9f9086f5-5cc5-47b5-af9b-a935f4e9b89c}") }; + RuneEntity runeHextech = new RuneEntity { Name = "Hextech Flashtraption ", Description = "While Flash is on cooldown, it is replaced by Hexflash.", Family = RuneFamilyEntity.Unknown, Icon = "", ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; + RuneEntity runeManaflow = new RuneEntity { Name = "Manaflow Band ", Description = "Hitting enemy champions with a spell grants 25 maximum mana, up to 250 mana.", Family = RuneFamilyEntity.Domination, Icon = "", ImageId = Guid.Parse("{9f9086f5-5cc5-47b5-af9b-a935f4e9b89c}") }; modelBuilder.Entity().HasData(runeHextech, runeManaflow); //RunePageEntity diff --git a/src/EntityFramework_LoL/Sources/Tests/UT_EF/RunesTest.cs b/src/EntityFramework_LoL/Sources/Tests/UT_EF/RunesTest.cs index 6b004d5..4620f30 100644 --- a/src/EntityFramework_LoL/Sources/Tests/UT_EF/RunesTest.cs +++ b/src/EntityFramework_LoL/Sources/Tests/UT_EF/RunesTest.cs @@ -20,10 +20,10 @@ namespace UT_EF using (var context = new LolDbContext(options)) { - RuneEntity conqueror = new RuneEntity { Name = "Conqueror", Description = "by dealing damage to an enemy champion, you accumulate stacks that, once fully stacked, increase your damage and provide you with healing.", Family = RuneFamilyEntity.Unknown, ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; - RuneEntity ravenousHunter = new RuneEntity { Name = "Ravenous Hunter", Description = "killing minions, monsters, or enemy champions grants you stacks of Ravenous Hunter, which increase your damage against enemy champions and provide you with healing.", Family = RuneFamilyEntity.Domination, ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; - RuneEntity electrocute = new RuneEntity { Name = "Electrocute", Description = "hitting an enemy champion with 3 separate attacks or abilities within 3 seconds deals bonus damage.", Family = RuneFamilyEntity.Domination, ImageId = Guid.Parse("{e7c87f12-2c7b-44d5-8867-eba1ae5a4657}") }; - RuneEntity pressTheAttack = new RuneEntity { Name = "Press the Attack", Description = "hitting an enemy champion with 3 consecutive basic attacks deals bonus damage and makes them take increased damage from all sources for a short period of time.", Family = RuneFamilyEntity.Precision, ImageId = Guid.Parse("{7c354729-5ecf-43d8-ae73-153740e87644}") }; + RuneEntity conqueror = new RuneEntity { Name = "Conqueror", Description = "by dealing damage to an enemy champion, you accumulate stacks that, once fully stacked, increase your damage and provide you with healing.", Family = RuneFamilyEntity.Unknown, Icon = "", ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; + RuneEntity ravenousHunter = new RuneEntity { Name = "Ravenous Hunter", Description = "killing minions, monsters, or enemy champions grants you stacks of Ravenous Hunter, which increase your damage against enemy champions and provide you with healing.", Family = RuneFamilyEntity.Domination, Icon = "", ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; + RuneEntity electrocute = new RuneEntity { Name = "Electrocute", Description = "hitting an enemy champion with 3 separate attacks or abilities within 3 seconds deals bonus damage.", Family = RuneFamilyEntity.Domination, Icon = "", ImageId = Guid.Parse("{e7c87f12-2c7b-44d5-8867-eba1ae5a4657}") }; + RuneEntity pressTheAttack = new RuneEntity { Name = "Press the Attack", Description = "hitting an enemy champion with 3 consecutive basic attacks deals bonus damage and makes them take increased damage from all sources for a short period of time.", Family = RuneFamilyEntity.Precision, Icon = "", ImageId = Guid.Parse("{7c354729-5ecf-43d8-ae73-153740e87644}") }; context.Runes.AddRange(conqueror, ravenousHunter, electrocute, pressTheAttack); context.SaveChanges(); @@ -45,10 +45,10 @@ namespace UT_EF using (var context = new LolDbContext(options)) { - RuneEntity conqueror = new RuneEntity { Name = "Conqueror", Description = "by dealing damage to an enemy champion, you accumulate stacks that, once fully stacked, increase your damage and provide you with healing.", Family = RuneFamilyEntity.Unknown, ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; - RuneEntity ravenousHunter = new RuneEntity { Name = "Ravenous Hunter", Description = "killing minions, monsters, or enemy champions grants you stacks of Ravenous Hunter, which increase your damage against enemy champions and provide you with healing.", Family = RuneFamilyEntity.Domination, ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; - RuneEntity electrocute = new RuneEntity { Name = "Electrocute", Description = "hitting an enemy champion with 3 separate attacks or abilities within 3 seconds deals bonus damage.", Family = RuneFamilyEntity.Domination, ImageId = Guid.Parse("{e7c87f12-2c7b-44d5-8867-eba1ae5a4657}") }; - RuneEntity pressTheAttack = new RuneEntity { Name = "Press the Attack", Description = "hitting an enemy champion with 3 consecutive basic attacks deals bonus damage and makes them take increased damage from all sources for a short period of time.", Family = RuneFamilyEntity.Precision, ImageId = Guid.Parse("{7c354729-5ecf-43d8-ae73-153740e87644}") }; + RuneEntity conqueror = new RuneEntity { Name = "Conqueror", Description = "by dealing damage to an enemy champion, you accumulate stacks that, once fully stacked, increase your damage and provide you with healing.", Family = RuneFamilyEntity.Unknown, Icon = "", ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; + RuneEntity ravenousHunter = new RuneEntity { Name = "Ravenous Hunter", Description = "killing minions, monsters, or enemy champions grants you stacks of Ravenous Hunter, which increase your damage against enemy champions and provide you with healing.", Family = RuneFamilyEntity.Domination, Icon = "", ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; + RuneEntity electrocute = new RuneEntity { Name = "Electrocute", Description = "hitting an enemy champion with 3 separate attacks or abilities within 3 seconds deals bonus damage.", Family = RuneFamilyEntity.Domination, Icon = "", ImageId = Guid.Parse("{e7c87f12-2c7b-44d5-8867-eba1ae5a4657}") }; + RuneEntity pressTheAttack = new RuneEntity { Name = "Press the Attack", Description = "hitting an enemy champion with 3 consecutive basic attacks deals bonus damage and makes them take increased damage from all sources for a short period of time.", Family = RuneFamilyEntity.Precision, Icon = "", ImageId = Guid.Parse("{7c354729-5ecf-43d8-ae73-153740e87644}") }; context.Runes.AddRange(conqueror, ravenousHunter, electrocute, pressTheAttack); context.SaveChanges(); @@ -88,10 +88,10 @@ namespace UT_EF using (var context = new LolDbContext(options)) { - RuneEntity conqueror = new RuneEntity { Name = "Conqueror", Description = "by dealing damage to an enemy champion, you accumulate stacks that, once fully stacked, increase your damage and provide you with healing.", Family = RuneFamilyEntity.Unknown, ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; - RuneEntity ravenousHunter = new RuneEntity { Name = "Ravenous Hunter", Description = "killing minions, monsters, or enemy champions grants you stacks of Ravenous Hunter, which increase your damage against enemy champions and provide you with healing.", Family = RuneFamilyEntity.Domination, ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; - RuneEntity electrocute = new RuneEntity { Name = "Electrocute", Description = "hitting an enemy champion with 3 separate attacks or abilities within 3 seconds deals bonus damage.", Family = RuneFamilyEntity.Domination, ImageId = Guid.Parse("{e7c87f12-2c7b-44d5-8867-eba1ae5a4657}") }; - RuneEntity pressTheAttack = new RuneEntity { Name = "Press the Attack", Description = "hitting an enemy champion with 3 consecutive basic attacks deals bonus damage and makes them take increased damage from all sources for a short period of time.", Family = RuneFamilyEntity.Precision, ImageId = Guid.Parse("{7c354729-5ecf-43d8-ae73-153740e87644}") }; + RuneEntity conqueror = new RuneEntity { Name = "Conqueror", Description = "by dealing damage to an enemy champion, you accumulate stacks that, once fully stacked, increase your damage and provide you with healing.", Family = RuneFamilyEntity.Unknown, Icon = "", ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; + RuneEntity ravenousHunter = new RuneEntity { Name = "Ravenous Hunter", Description = "killing minions, monsters, or enemy champions grants you stacks of Ravenous Hunter, which increase your damage against enemy champions and provide you with healing.", Family = RuneFamilyEntity.Domination, Icon = "", ImageId = Guid.Parse("{8d121cdc-6787-4738-8edd-9e026ac16b65}") }; + RuneEntity electrocute = new RuneEntity { Name = "Electrocute", Description = "hitting an enemy champion with 3 separate attacks or abilities within 3 seconds deals bonus damage.", Family = RuneFamilyEntity.Domination, Icon = "", ImageId = Guid.Parse("{e7c87f12-2c7b-44d5-8867-eba1ae5a4657}") }; + RuneEntity pressTheAttack = new RuneEntity { Name = "Press the Attack", Description = "hitting an enemy champion with 3 consecutive basic attacks deals bonus damage and makes them take increased damage from all sources for a short period of time.", Family = RuneFamilyEntity.Precision, Icon = "", ImageId = Guid.Parse("{7c354729-5ecf-43d8-ae73-153740e87644}") }; context.Runes.AddRange(conqueror, ravenousHunter, electrocute, pressTheAttack); context.SaveChanges();