From c6e7171d0ad0b4ca805d95a89016fa9ad936a846 Mon Sep 17 00:00:00 2001 From: Thomas Chazot Date: Wed, 1 Feb 2023 17:58:45 +0100 Subject: [PATCH] Ajout du managerData --- .../Sources/ApiLol/ApiLol.csproj | 13 +++ .../Controllers/WeatherForecastController.cs | 33 ++++++ EntityFramework_LoL/Sources/ApiLol/Program.cs | 26 +++++ .../ApiLol/Properties/launchSettings.json | 30 +++++ .../Sources/ApiLol/WeatherForecast.cs | 13 +++ .../ApiLol/appsettings.Development.json | 9 ++ .../Sources/ApiLol/appsettings.json | 10 ++ .../Sources/ConsoleDb/ConsoleDb.csproj | 22 +++- .../Sources/ConsoleDb/Program.cs | 11 +- .../Sources/ConsoleDb/oiseaux.db | Bin 0 -> 20480 bytes .../Sources/DataManagers/ChampChanger.cs | 25 +++++ .../Sources/DataManagers/DataManagers.csproj | 13 +++ .../Sources/DataManagers/DbChampionManager.cs | 104 ++++++++++++++++++ .../Sources/DataManagers/DbDataManager.cs | 50 +++++++++ .../Sources/EFLib/ChampionEntity.cs | 4 + .../Sources/EFLib/EFLib.csproj | 3 + .../Sources/EFLib/LolContext.cs | 2 +- ....cs => 20230201085244_oiseaux.Designer.cs} | 7 +- ...9_oiseaux.cs => 20230201085244_oiseaux.cs} | 9 +- .../Migrations/LolContextModelSnapshot.cs | 5 +- EntityFramework_LoL/Sources/EFLib/Program.cs | 12 ++ EntityFramework_LoL/Sources/EFLib/oiseaux.db | Bin 20480 -> 20480 bytes .../Sources/LeagueOfLegends.sln | 12 ++ .../Sources/Model/IDataManager.cs | 2 +- .../Sources/StubLib/StubData.cs | 6 +- 25 files changed, 407 insertions(+), 14 deletions(-) create mode 100644 EntityFramework_LoL/Sources/ApiLol/ApiLol.csproj create mode 100644 EntityFramework_LoL/Sources/ApiLol/Controllers/WeatherForecastController.cs create mode 100644 EntityFramework_LoL/Sources/ApiLol/Program.cs create mode 100644 EntityFramework_LoL/Sources/ApiLol/Properties/launchSettings.json create mode 100644 EntityFramework_LoL/Sources/ApiLol/WeatherForecast.cs create mode 100644 EntityFramework_LoL/Sources/ApiLol/appsettings.Development.json create mode 100644 EntityFramework_LoL/Sources/ApiLol/appsettings.json create mode 100644 EntityFramework_LoL/Sources/ConsoleDb/oiseaux.db create mode 100644 EntityFramework_LoL/Sources/DataManagers/ChampChanger.cs create mode 100644 EntityFramework_LoL/Sources/DataManagers/DataManagers.csproj create mode 100644 EntityFramework_LoL/Sources/DataManagers/DbChampionManager.cs create mode 100644 EntityFramework_LoL/Sources/DataManagers/DbDataManager.cs rename EntityFramework_LoL/Sources/EFLib/Migrations/{20230126083419_oiseaux.Designer.cs => 20230201085244_oiseaux.Designer.cs} (87%) rename EntityFramework_LoL/Sources/EFLib/Migrations/{20230126083419_oiseaux.cs => 20230201085244_oiseaux.cs} (81%) diff --git a/EntityFramework_LoL/Sources/ApiLol/ApiLol.csproj b/EntityFramework_LoL/Sources/ApiLol/ApiLol.csproj new file mode 100644 index 0000000..4289e82 --- /dev/null +++ b/EntityFramework_LoL/Sources/ApiLol/ApiLol.csproj @@ -0,0 +1,13 @@ + + + + net6.0 + enable + enable + + + + + + + diff --git a/EntityFramework_LoL/Sources/ApiLol/Controllers/WeatherForecastController.cs b/EntityFramework_LoL/Sources/ApiLol/Controllers/WeatherForecastController.cs new file mode 100644 index 0000000..d460f12 --- /dev/null +++ b/EntityFramework_LoL/Sources/ApiLol/Controllers/WeatherForecastController.cs @@ -0,0 +1,33 @@ +using Microsoft.AspNetCore.Mvc; + +namespace ApiLol.Controllers; + +[ApiController] +[Route("[controller]")] +public class WeatherForecastController : ControllerBase +{ + private static readonly string[] Summaries = new[] + { + "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" + }; + + private readonly ILogger _logger; + + public WeatherForecastController(ILogger logger) + { + _logger = logger; + } + + [HttpGet(Name = "GetWeatherForecast")] + public IEnumerable Get() + { + return Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = DateTime.Now.AddDays(index), + TemperatureC = Random.Shared.Next(-20, 55), + Summary = Summaries[Random.Shared.Next(Summaries.Length)] + }) + .ToArray(); + } +} + diff --git a/EntityFramework_LoL/Sources/ApiLol/Program.cs b/EntityFramework_LoL/Sources/ApiLol/Program.cs new file mode 100644 index 0000000..62b4262 --- /dev/null +++ b/EntityFramework_LoL/Sources/ApiLol/Program.cs @@ -0,0 +1,26 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. + +builder.Services.AddControllers(); +// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle +builder.Services.AddEndpointsApiExplorer(); +builder.Services.AddSwaggerGen(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.UseSwagger(); + app.UseSwaggerUI(); +} + +app.UseHttpsRedirection(); + +app.UseAuthorization(); + +app.MapControllers(); + +app.Run(); + diff --git a/EntityFramework_LoL/Sources/ApiLol/Properties/launchSettings.json b/EntityFramework_LoL/Sources/ApiLol/Properties/launchSettings.json new file mode 100644 index 0000000..131f9b7 --- /dev/null +++ b/EntityFramework_LoL/Sources/ApiLol/Properties/launchSettings.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:44889", + "sslPort": 44302 + } + }, + "profiles": { + "ApiLol": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "https://localhost:7006;http://localhost:5131", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/EntityFramework_LoL/Sources/ApiLol/WeatherForecast.cs b/EntityFramework_LoL/Sources/ApiLol/WeatherForecast.cs new file mode 100644 index 0000000..8c69d81 --- /dev/null +++ b/EntityFramework_LoL/Sources/ApiLol/WeatherForecast.cs @@ -0,0 +1,13 @@ +namespace ApiLol; + +public class WeatherForecast +{ + public DateTime Date { get; set; } + + public int TemperatureC { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + + public string? Summary { get; set; } +} + diff --git a/EntityFramework_LoL/Sources/ApiLol/appsettings.Development.json b/EntityFramework_LoL/Sources/ApiLol/appsettings.Development.json new file mode 100644 index 0000000..ce16a2e --- /dev/null +++ b/EntityFramework_LoL/Sources/ApiLol/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} + diff --git a/EntityFramework_LoL/Sources/ApiLol/appsettings.json b/EntityFramework_LoL/Sources/ApiLol/appsettings.json new file mode 100644 index 0000000..af0538f --- /dev/null +++ b/EntityFramework_LoL/Sources/ApiLol/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} + diff --git a/EntityFramework_LoL/Sources/ConsoleDb/ConsoleDb.csproj b/EntityFramework_LoL/Sources/ConsoleDb/ConsoleDb.csproj index 8c3f25a..0bc60ce 100644 --- a/EntityFramework_LoL/Sources/ConsoleDb/ConsoleDb.csproj +++ b/EntityFramework_LoL/Sources/ConsoleDb/ConsoleDb.csproj @@ -5,9 +5,29 @@ net6.0 enable enable + $(MSBuildProjectDirectory) - + + + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + diff --git a/EntityFramework_LoL/Sources/ConsoleDb/Program.cs b/EntityFramework_LoL/Sources/ConsoleDb/Program.cs index 08b7c8d..87658d6 100644 --- a/EntityFramework_LoL/Sources/ConsoleDb/Program.cs +++ b/EntityFramework_LoL/Sources/ConsoleDb/Program.cs @@ -1,4 +1,11 @@ -using EFLib; +// See https://aka.ms/new-console-template for more information +using DataManagers; +using Model; -ChampionEntity ChampionEntity +Console.WriteLine("Hello, World!"); +using (var db = new DbDataManager(new EFLib.LolContext())) +{ + Champion champ = await db.Add(new Model.Champion("marche", Model.ChampionClass.Assassin, "ouii", "yes", "bio")); + Console.WriteLine(champ.Name); +} \ No newline at end of file diff --git a/EntityFramework_LoL/Sources/ConsoleDb/oiseaux.db b/EntityFramework_LoL/Sources/ConsoleDb/oiseaux.db new file mode 100644 index 0000000000000000000000000000000000000000..4e8122351e23cd340fee244c7ddb81206ba21160 GIT binary patch literal 20480 zcmeI&y>6RO6bJANcD^jR?uObSxnhcy$RZ?_o2|sUZBcCO5?s|og{VzhBpVvQQZl9; z`ZRr<4Ba~Q89Mgh63ceU10?+)apn5~hkJjB0mIpwc98n~Jc=h?$`9FNCd=#v=ZrC# z${Lm1$lB%G2K`D4^}DJvYq(FVwco5<{l*^M)V^1LPz3=22tWV=5P$##AOHafK;Zus z=#|%%y*+7=dLPDqaxtc7GB@!rrhYhFZLYO!VK{<2#z|Z7m3?$&nlX<1Qlt-QSt9-Y@DO7W$a?^6eD`9i1>u{^zZu3^xI&*A;`nlRW zbr+86*=EPE2mDkFxY2jIrbQ>{2+P_3o6e${soW9oC{vy-A2EkfSUhqPM8yNcY&os5 zmn8qru~NV8OB+hFDSa_#Yj<7ovJ-ray)*-O9VBTKUln%B%O-{U%zfr5GpMC?tt#D- zXF)8N=*7`!I!xdCaY9pF$y%wK^1AZADX}0N`Iq^X_oityYrBPKaSsZ+OLVJkX180F zid6f_XhT2%0uX=z1Rwwb2tWV=5P$##AaG9wwx!asqHFr0rfUb<^Jn_eksAex?@ce8 z4XvS9XkAk67o!aU0SG_<0uX=z1Rwwb2tWV=5P-nF7I;!R-YWhRAbbB$AN?aB009U< x00Izz00bZa0SG_<0uXq>0(ky^z!w)wg8&2|009U<00Izz00bZa0SM#*e*jp0-+urA literal 0 HcmV?d00001 diff --git a/EntityFramework_LoL/Sources/DataManagers/ChampChanger.cs b/EntityFramework_LoL/Sources/DataManagers/ChampChanger.cs new file mode 100644 index 0000000..7e5208c --- /dev/null +++ b/EntityFramework_LoL/Sources/DataManagers/ChampChanger.cs @@ -0,0 +1,25 @@ +using System; +using EFLib; +using Model; + +namespace DataManagers +{ + public static class ChampChanger + { + public static Champion ToPoco(this ChampionEntity champion) + { + return new Champion(name: champion.Name, champClass: ChampionClass.Unknown, icon: champion.Icon, bio: champion.Bio); + } + + public static ChampionEntity ToEntity(this Champion champion) + { + return new ChampionEntity + { + Name = champion.Name, + Bio = champion.Bio, + Icon = champion.Icon, + }; + } + } +} + diff --git a/EntityFramework_LoL/Sources/DataManagers/DataManagers.csproj b/EntityFramework_LoL/Sources/DataManagers/DataManagers.csproj new file mode 100644 index 0000000..4c09789 --- /dev/null +++ b/EntityFramework_LoL/Sources/DataManagers/DataManagers.csproj @@ -0,0 +1,13 @@ + + + + net6.0 + enable + enable + + + + + + + diff --git a/EntityFramework_LoL/Sources/DataManagers/DbChampionManager.cs b/EntityFramework_LoL/Sources/DataManagers/DbChampionManager.cs new file mode 100644 index 0000000..68e32f1 --- /dev/null +++ b/EntityFramework_LoL/Sources/DataManagers/DbChampionManager.cs @@ -0,0 +1,104 @@ +using System; +using Microsoft.EntityFrameworkCore; +using Model; +using EFLib; + +namespace DataManagers +{ + public class DbChampionManager : IChampionsManager + { + private LolContext Context { get; set; } + + public DbChampionManager(LolContext context) + { + Context = context; + } + + public Task AddItem(Champion? item) + { + throw new NotImplementedException(); + } + + public Task DeleteItem(Champion? item) + { + throw new NotImplementedException(); + } + + public Task> GetItems(int index, int count, string? orderingPropertyName = null, bool descending = false) + { + throw new NotImplementedException(); + } + + public Task> GetItemsByCharacteristic(string charName, int index, int count, string? orderingPropertyName = null, bool descending = false) + { + throw new NotImplementedException(); + } + + public Task> GetItemsByClass(ChampionClass championClass, int index, int count, string? orderingPropertyName = null, bool descending = false) + { + throw new NotImplementedException(); + } + + public Task> GetItemsByName(string substring, int index, int count, string? orderingPropertyName = null, bool descending = false) + { + throw new NotImplementedException(); + } + + public Task> GetItemsByRunePage(RunePage? runePage, int index, int count, string? orderingPropertyName = null, bool descending = false) + { + throw new NotImplementedException(); + } + + public Task> GetItemsBySkill(Skill? skill, int index, int count, string? orderingPropertyName = null, bool descending = false) + { + throw new NotImplementedException(); + } + + public Task> GetItemsBySkill(string skill, int index, int count, string? orderingPropertyName = null, bool descending = false) + { + throw new NotImplementedException(); + } + + public async Task GetNbItems() + { + return await Task.Run(() => Context.Champions.Count()); + + } + + public Task GetNbItemsByCharacteristic(string charName) + { + throw new NotImplementedException(); + } + + public Task GetNbItemsByClass(ChampionClass championClass) + { + throw new NotImplementedException(); + } + + public Task GetNbItemsByName(string substring) + { + throw new NotImplementedException(); + } + + public Task GetNbItemsByRunePage(RunePage? runePage) + { + throw new NotImplementedException(); + } + + public Task GetNbItemsBySkill(Skill? skill) + { + throw new NotImplementedException(); + } + + public Task GetNbItemsBySkill(string skill) + { + throw new NotImplementedException(); + } + + public Task UpdateItem(Champion? oldItem, Champion? newItem) + { + throw new NotImplementedException(); + } + } +} + diff --git a/EntityFramework_LoL/Sources/DataManagers/DbDataManager.cs b/EntityFramework_LoL/Sources/DataManagers/DbDataManager.cs new file mode 100644 index 0000000..0b8ba8d --- /dev/null +++ b/EntityFramework_LoL/Sources/DataManagers/DbDataManager.cs @@ -0,0 +1,50 @@ +using System; +using EFLib; +using Model; + +namespace DataManagers +{ + public class DbDataManager : IDataManager + { + + private LolContext Context { get; set; } + + public IChampionsManager ChampionsMgr => throw new NotImplementedException(); + + public ISkinsManager SkinsMgr => throw new NotImplementedException(); + + public IRunesManager RunesMgr => throw new NotImplementedException(); + + public IRunePagesManager RunePagesMgr => throw new NotImplementedException(); + + + public DbDataManager(LolContext context) + { + Context = context; + } + + public async Task GetNumbersOfElement() + { + return await Task.Run(() => Context.Champions.Count()); + } + + public async Task GetById(int id) + { + return await Task.Run(() => Context.Champions.SingleOrDefault((ChampionEntity arg) => arg.Id == id).ToPoco()); + } + + public async Task Add(Champion champ) + { + ChampionEntity entity = champ.ToEntity(); + await Context.Champions.AddAsync(entity); + Context.SaveChanges(); + return await Task.Run(() => Context.Champions.SingleOrDefault((ChampionEntity arg) => arg.Name == champ.Name && arg.Bio == champ.Bio).ToPoco()); + } + + public void Dispose() + { + Context.Dispose(); + } + } +} + diff --git a/EntityFramework_LoL/Sources/EFLib/ChampionEntity.cs b/EntityFramework_LoL/Sources/EFLib/ChampionEntity.cs index d2ec9a0..8b3b00d 100644 --- a/EntityFramework_LoL/Sources/EFLib/ChampionEntity.cs +++ b/EntityFramework_LoL/Sources/EFLib/ChampionEntity.cs @@ -1,4 +1,6 @@ using System; +using Model; + namespace EFLib { public class ChampionEntity @@ -12,6 +14,8 @@ namespace EFLib public string Bio { get; set; } + public ChampionClass champClass { get; set;} + } } diff --git a/EntityFramework_LoL/Sources/EFLib/EFLib.csproj b/EntityFramework_LoL/Sources/EFLib/EFLib.csproj index fcb4a9f..999d095 100644 --- a/EntityFramework_LoL/Sources/EFLib/EFLib.csproj +++ b/EntityFramework_LoL/Sources/EFLib/EFLib.csproj @@ -26,4 +26,7 @@ all + + + diff --git a/EntityFramework_LoL/Sources/EFLib/LolContext.cs b/EntityFramework_LoL/Sources/EFLib/LolContext.cs index 664a267..32b07da 100644 --- a/EntityFramework_LoL/Sources/EFLib/LolContext.cs +++ b/EntityFramework_LoL/Sources/EFLib/LolContext.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; namespace EFLib { - public class LolContext : DbContext + public class LolContext : DbContext, IDisposable { public DbSet Champions { get; set; } diff --git a/EntityFramework_LoL/Sources/EFLib/Migrations/20230126083419_oiseaux.Designer.cs b/EntityFramework_LoL/Sources/EFLib/Migrations/20230201085244_oiseaux.Designer.cs similarity index 87% rename from EntityFramework_LoL/Sources/EFLib/Migrations/20230126083419_oiseaux.Designer.cs rename to EntityFramework_LoL/Sources/EFLib/Migrations/20230201085244_oiseaux.Designer.cs index 15b2f75..5ff8325 100644 --- a/EntityFramework_LoL/Sources/EFLib/Migrations/20230126083419_oiseaux.Designer.cs +++ b/EntityFramework_LoL/Sources/EFLib/Migrations/20230201085244_oiseaux.Designer.cs @@ -10,7 +10,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace EFLib.Migrations { [DbContext(typeof(LolContext))] - [Migration("20230126083419_oiseaux")] + [Migration("20230201085244_oiseaux")] partial class oiseaux { /// @@ -37,9 +37,12 @@ namespace EFLib.Migrations .IsRequired() .HasColumnType("TEXT"); + b.Property("champClass") + .HasColumnType("INTEGER"); + b.HasKey("Id"); - b.ToTable("champions"); + b.ToTable("Champions"); }); #pragma warning restore 612, 618 } diff --git a/EntityFramework_LoL/Sources/EFLib/Migrations/20230126083419_oiseaux.cs b/EntityFramework_LoL/Sources/EFLib/Migrations/20230201085244_oiseaux.cs similarity index 81% rename from EntityFramework_LoL/Sources/EFLib/Migrations/20230126083419_oiseaux.cs rename to EntityFramework_LoL/Sources/EFLib/Migrations/20230201085244_oiseaux.cs index 7336329..8ec4c02 100644 --- a/EntityFramework_LoL/Sources/EFLib/Migrations/20230126083419_oiseaux.cs +++ b/EntityFramework_LoL/Sources/EFLib/Migrations/20230201085244_oiseaux.cs @@ -11,18 +11,19 @@ namespace EFLib.Migrations protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( - name: "champions", + name: "Champions", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), Name = table.Column(type: "TEXT", nullable: false), Icon = table.Column(type: "TEXT", nullable: false), - Bio = table.Column(type: "TEXT", nullable: false) + Bio = table.Column(type: "TEXT", nullable: false), + champClass = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { - table.PrimaryKey("PK_champions", x => x.Id); + table.PrimaryKey("PK_Champions", x => x.Id); }); } @@ -30,7 +31,7 @@ namespace EFLib.Migrations protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( - name: "champions"); + name: "Champions"); } } } diff --git a/EntityFramework_LoL/Sources/EFLib/Migrations/LolContextModelSnapshot.cs b/EntityFramework_LoL/Sources/EFLib/Migrations/LolContextModelSnapshot.cs index e3c0e56..4ed1d6c 100644 --- a/EntityFramework_LoL/Sources/EFLib/Migrations/LolContextModelSnapshot.cs +++ b/EntityFramework_LoL/Sources/EFLib/Migrations/LolContextModelSnapshot.cs @@ -34,9 +34,12 @@ namespace EFLib.Migrations .IsRequired() .HasColumnType("TEXT"); + b.Property("champClass") + .HasColumnType("INTEGER"); + b.HasKey("Id"); - b.ToTable("champions"); + b.ToTable("Champions"); }); #pragma warning restore 612, 618 } diff --git a/EntityFramework_LoL/Sources/EFLib/Program.cs b/EntityFramework_LoL/Sources/EFLib/Program.cs index 3ed0e5d..bf37432 100644 --- a/EntityFramework_LoL/Sources/EFLib/Program.cs +++ b/EntityFramework_LoL/Sources/EFLib/Program.cs @@ -1,3 +1,15 @@ // See https://aka.ms/new-console-template for more information +using EFLib; + Console.WriteLine("Hello, World!"); +using (var context = new LolContext()) +{ + context.Champions.Add(new ChampionEntity + { + Name = "Test", + Bio = "Bonjour", + Icon = "Wouhou" + }); + context.SaveChanges(); +} \ No newline at end of file diff --git a/EntityFramework_LoL/Sources/EFLib/oiseaux.db b/EntityFramework_LoL/Sources/EFLib/oiseaux.db index adc9f7bbad9d2755933707b42c928a2d8c93a081..4e8122351e23cd340fee244c7ddb81206ba21160 100644 GIT binary patch delta 145 zcmZozz}T>WaY7bXI|JWU{V;FVEQQSdy5Olj@w2m|KvU zpH~cLus8>~I)=C^gg83+xGE?)PuAr#WptjL%vUgZ0Ux_?GDw4SPGWJfl7gpSh^xD6 g(B@No3WA(Q28IR}rbZ?vn?K9{;YZ^B(C1J90AF4$O#lD@ delta 122 zcmZozz}T>WaY7c?Dh9r*{A+pt@UGe{C}74rxt%xIAdHz^Twb2Bsk$UFDJL~KBQdui zGe55w&R}s4a&-)GRS0o(@^MvAN}kNcXUdp7*@3TM^JPA9K~6&>GXo1_6GO|*pXLAX LBXNJ|b0`1+g}5dT diff --git a/EntityFramework_LoL/Sources/LeagueOfLegends.sln b/EntityFramework_LoL/Sources/LeagueOfLegends.sln index ee0f61a..d767722 100644 --- a/EntityFramework_LoL/Sources/LeagueOfLegends.sln +++ b/EntityFramework_LoL/Sources/LeagueOfLegends.sln @@ -19,6 +19,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFLib", "EFLib\EFLib.csproj EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleDb", "ConsoleDb\ConsoleDb.csproj", "{30AF9CBD-1E40-46F2-973F-6C13F1E15660}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataManagers", "DataManagers\DataManagers.csproj", "{C9FEBC1B-0157-4D48-8AFF-D3805289D083}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiLol", "ApiLol\ApiLol.csproj", "{51E7E6BF-95E8-4B0E-BB03-330893931C17}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -49,6 +53,14 @@ Global {30AF9CBD-1E40-46F2-973F-6C13F1E15660}.Debug|Any CPU.Build.0 = Debug|Any CPU {30AF9CBD-1E40-46F2-973F-6C13F1E15660}.Release|Any CPU.ActiveCfg = Release|Any CPU {30AF9CBD-1E40-46F2-973F-6C13F1E15660}.Release|Any CPU.Build.0 = Release|Any CPU + {C9FEBC1B-0157-4D48-8AFF-D3805289D083}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C9FEBC1B-0157-4D48-8AFF-D3805289D083}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C9FEBC1B-0157-4D48-8AFF-D3805289D083}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C9FEBC1B-0157-4D48-8AFF-D3805289D083}.Release|Any CPU.Build.0 = Release|Any CPU + {51E7E6BF-95E8-4B0E-BB03-330893931C17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {51E7E6BF-95E8-4B0E-BB03-330893931C17}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51E7E6BF-95E8-4B0E-BB03-330893931C17}.Release|Any CPU.ActiveCfg = Release|Any CPU + {51E7E6BF-95E8-4B0E-BB03-330893931C17}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/EntityFramework_LoL/Sources/Model/IDataManager.cs b/EntityFramework_LoL/Sources/Model/IDataManager.cs index a185e15..a1fa088 100644 --- a/EntityFramework_LoL/Sources/Model/IDataManager.cs +++ b/EntityFramework_LoL/Sources/Model/IDataManager.cs @@ -3,7 +3,7 @@ using Shared; namespace Model { - public interface IDataManager + public interface IDataManager : IDisposable { IChampionsManager ChampionsMgr { get; } ISkinsManager SkinsMgr { get; } diff --git a/EntityFramework_LoL/Sources/StubLib/StubData.cs b/EntityFramework_LoL/Sources/StubLib/StubData.cs index 8e34486..8f9023a 100644 --- a/EntityFramework_LoL/Sources/StubLib/StubData.cs +++ b/EntityFramework_LoL/Sources/StubLib/StubData.cs @@ -29,7 +29,9 @@ public partial class StubData : IDataManager championsAndRunePages.Add(Tuple.Create(champions[0], runePages[0])); } - - + public void Dispose() + { + + } }