diff --git a/Week7/FootballManager/.vs/FootballManager/v16/.suo b/Week7/FootballManager/.vs/FootballManager/v16/.suo index 3d260af..f12a339 100644 Binary files a/Week7/FootballManager/.vs/FootballManager/v16/.suo and b/Week7/FootballManager/.vs/FootballManager/v16/.suo differ diff --git a/Week7/FootballManager/FootballManager.API/Controllers/FootballerController.cs b/Week7/FootballManager/FootballManager.API/Controllers/FootballerController.cs index 43d0c18..35cdb22 100644 --- a/Week7/FootballManager/FootballManager.API/Controllers/FootballerController.cs +++ b/Week7/FootballManager/FootballManager.API/Controllers/FootballerController.cs @@ -1,4 +1,8 @@ -using Microsoft.AspNetCore.Http; +using AutoMapper; +using FootballManager.Entities; +using FootballManager.Service.DTOs.Footballer; +using FootballManager.Service.Interfaces; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; @@ -11,8 +15,29 @@ namespace FootballManager.API.Controllers [ApiController] public class FootballerController : ControllerBase { + private IFootballerService _footballerService; + private IMapper _mapper; - + public FootballerController(IFootballerService footballerService,IMapper mapper) + { + _footballerService = footballerService; + _mapper = mapper; + } + + [HttpPost] + public async Task AddFootballer(AddFootballerDTO footballerdto) + { + await _footballerService.AddAsync(_mapper.Map(footballerdto)); + return Ok(); + } + + [HttpPut] + public IActionResult UpdateFootballer(UpdateFootballerDTO footballerdto) + { + + _footballerService.Update(_mapper.Map(footballerdto)); + return Ok(); + } } diff --git a/Week7/FootballManager/FootballManager.API/FootballManager.API.csproj b/Week7/FootballManager/FootballManager.API/FootballManager.API.csproj index a170c5f..47ed3a9 100644 --- a/Week7/FootballManager/FootballManager.API/FootballManager.API.csproj +++ b/Week7/FootballManager/FootballManager.API/FootballManager.API.csproj @@ -1,10 +1,12 @@ - + net5.0 + + all diff --git a/Week7/FootballManager/FootballManager.API/Mapping/FootballerProfile.cs b/Week7/FootballManager/FootballManager.API/Mapping/FootballerProfile.cs new file mode 100644 index 0000000..7691aef --- /dev/null +++ b/Week7/FootballManager/FootballManager.API/Mapping/FootballerProfile.cs @@ -0,0 +1,19 @@ +using AutoMapper; +using FootballManager.Entities; +using FootballManager.Service.DTOs.Footballer; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace FootballManager.API.Mapping +{ + public class FootballerProfile : Profile + { + public FootballerProfile() + { + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + } + } +} diff --git a/Week7/FootballManager/FootballManager.API/Startup.cs b/Week7/FootballManager/FootballManager.API/Startup.cs index cffae9f..4701c7a 100644 --- a/Week7/FootballManager/FootballManager.API/Startup.cs +++ b/Week7/FootballManager/FootballManager.API/Startup.cs @@ -22,17 +22,20 @@ public Startup(IConfiguration configuration) public IConfiguration Configuration { get; } - // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) { - + // My service extensions services.AddMyContext(Configuration); services.AddMyServices(); services.AddUnitOfWorkService(); + + //AutoMapper + services.AddAutoMapper(typeof(Startup)); services.AddControllers(); } - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) diff --git a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/AutoMapper.Extensions.Microsoft.DependencyInjection.dll b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/AutoMapper.Extensions.Microsoft.DependencyInjection.dll new file mode 100644 index 0000000..ada000e Binary files /dev/null and b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/AutoMapper.Extensions.Microsoft.DependencyInjection.dll differ diff --git a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/AutoMapper.dll b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/AutoMapper.dll new file mode 100644 index 0000000..d8bab71 Binary files /dev/null and b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/AutoMapper.dll differ diff --git a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.API.deps.json b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.API.deps.json index a5aad7d..ec27390 100644 --- a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.API.deps.json +++ b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.API.deps.json @@ -33,6 +33,8 @@ ".NETCoreApp,Version=v5.0": { "FootballManager.API/1.0.0": { "dependencies": { + "AutoMapper": "10.1.1", + "AutoMapper.Extensions.Microsoft.DependencyInjection": "8.1.1", "FootballManager.Service": "1.0.0", "Microsoft.EntityFrameworkCore": "5.0.12", "Microsoft.EntityFrameworkCore.Design": "5.0.12", @@ -321,6 +323,37 @@ "FootballManager.API.dll": {} } }, + "AutoMapper/10.1.1": { + "dependencies": { + "Microsoft.CSharp": "4.7.0", + "System.Reflection.Emit": "4.7.0" + }, + "runtime": { + "lib/netstandard2.0/AutoMapper.dll": { + "assemblyVersion": "10.0.0.0", + "fileVersion": "10.1.1.0" + } + }, + "compile": { + "lib/netstandard2.0/AutoMapper.dll": {} + } + }, + "AutoMapper.Extensions.Microsoft.DependencyInjection/8.1.1": { + "dependencies": { + "AutoMapper": "10.1.1", + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Options": "5.0.0" + }, + "runtime": { + "lib/netstandard2.0/AutoMapper.Extensions.Microsoft.DependencyInjection.dll": { + "assemblyVersion": "8.0.0.0", + "fileVersion": "8.1.1.0" + } + }, + "compile": { + "lib/netstandard2.0/AutoMapper.Extensions.Microsoft.DependencyInjection.dll": {} + } + }, "Humanizer.Core/2.8.26": { "runtime": { "lib/netstandard2.0/Humanizer.dll": { @@ -877,7 +910,7 @@ "System.Linq.Expressions": "4.3.0", "System.ObjectModel": "4.3.0", "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", + "System.Reflection.Emit": "4.7.0", "System.Reflection.Emit.ILGeneration": "4.3.0", "System.Reflection.Primitives": "4.3.0", "System.Reflection.TypeExtensions": "4.3.0", @@ -964,7 +997,7 @@ "System.Linq": "4.3.0", "System.ObjectModel": "4.3.0", "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", + "System.Reflection.Emit": "4.7.0", "System.Reflection.Emit.ILGeneration": "4.3.0", "System.Reflection.Emit.Lightweight": "4.3.0", "System.Reflection.Extensions": "4.3.0", @@ -1056,15 +1089,7 @@ "System.Runtime": "4.3.0" } }, - "System.Reflection.Emit/4.3.0": { - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, + "System.Reflection.Emit/4.7.0": {}, "System.Reflection.Emit.ILGeneration/4.3.0": { "dependencies": { "System.Reflection": "4.3.0", @@ -1396,7 +1421,7 @@ "System.IO": "4.3.0", "System.Linq": "4.3.0", "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", + "System.Reflection.Emit": "4.7.0", "System.Reflection.Emit.ILGeneration": "4.3.0", "System.Reflection.Extensions": "4.3.0", "System.Reflection.Primitives": "4.3.0", @@ -1444,6 +1469,8 @@ }, "FootballManager.Service/1.0.0": { "dependencies": { + "AutoMapper": "10.1.1", + "AutoMapper.Extensions.Microsoft.DependencyInjection": "8.1.1", "FootballManager.Data": "1.0.0", "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", "System.Configuration.ConfigurationManager": "6.0.0" @@ -3125,6 +3152,20 @@ "serviceable": false, "sha512": "" }, + "AutoMapper/10.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-uMgbqOdu9ZG5cIOty0C85hzzayBH2i9BthnS5FlMqKtMSHDv4ts81a2jS1VFaDBVhlBeIqJ/kQKjQY95BZde9w==", + "path": "automapper/10.1.1", + "hashPath": "automapper.10.1.1.nupkg.sha512" + }, + "AutoMapper.Extensions.Microsoft.DependencyInjection/8.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-xSWoVzOipuDU4PeZcUfaZQ+xqXU8QmGv5jrdlxt3MYm9xaOmrefqcfzGQ3SQ+D+8wfBa/ZwSuL0qKOVj080inA==", + "path": "automapper.extensions.microsoft.dependencyinjection/8.1.1", + "hashPath": "automapper.extensions.microsoft.dependencyinjection.8.1.1.nupkg.sha512" + }, "Humanizer.Core/2.8.26": { "type": "package", "serviceable": true, @@ -3559,12 +3600,12 @@ "path": "system.reflection/4.3.0", "hashPath": "system.reflection.4.3.0.nupkg.sha512" }, - "System.Reflection.Emit/4.3.0": { + "System.Reflection.Emit/4.7.0": { "type": "package", "serviceable": true, - "sha512": "sha512-228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", - "path": "system.reflection.emit/4.3.0", - "hashPath": "system.reflection.emit.4.3.0.nupkg.sha512" + "sha512": "sha512-VR4kk8XLKebQ4MZuKuIni/7oh+QGFmZW3qORd1GvBq/8026OpW501SzT/oypwiQl4TvT8ErnReh/NzY9u+C6wQ==", + "path": "system.reflection.emit/4.7.0", + "hashPath": "system.reflection.emit.4.7.0.nupkg.sha512" }, "System.Reflection.Emit.ILGeneration/4.3.0": { "type": "package", diff --git a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.API.dll b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.API.dll index 831ccf0..69c6b0b 100644 Binary files a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.API.dll and b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.API.dll differ diff --git a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.API.pdb b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.API.pdb index 619ee95..b3943bb 100644 Binary files a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.API.pdb and b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.API.pdb differ diff --git a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Core.dll b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Core.dll index dc2ddc7..50b81e9 100644 Binary files a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Core.dll and b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Core.dll differ diff --git a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Core.pdb b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Core.pdb index 72fd30b..a7f8626 100644 Binary files a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Core.pdb and b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Core.pdb differ diff --git a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Data.dll b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Data.dll index 35704b3..793cd78 100644 Binary files a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Data.dll and b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Data.dll differ diff --git a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Data.pdb b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Data.pdb index ef579f6..49f034d 100644 Binary files a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Data.pdb and b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Data.pdb differ diff --git a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Entities.dll b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Entities.dll index d4df665..8b9ad52 100644 Binary files a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Entities.dll and b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Entities.dll differ diff --git a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Entities.pdb b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Entities.pdb index 55c8189..e3e2f5a 100644 Binary files a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Entities.pdb and b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Entities.pdb differ diff --git a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Service.dll b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Service.dll index a2a579b..16d4893 100644 Binary files a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Service.dll and b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Service.dll differ diff --git a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Service.pdb b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Service.pdb index 3c623da..b10d9d2 100644 Binary files a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Service.pdb and b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/FootballManager.Service.pdb differ diff --git a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/ref/FootballManager.API.dll b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/ref/FootballManager.API.dll index 7abd7f6..30fd030 100644 Binary files a/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/ref/FootballManager.API.dll and b/Week7/FootballManager/FootballManager.API/bin/Debug/net5.0/ref/FootballManager.API.dll differ diff --git a/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.assets.cache b/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.assets.cache index 71e3412..33d4069 100644 Binary files a/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.assets.cache and b/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.assets.cache differ diff --git a/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.csproj.CoreCompileInputs.cache b/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.csproj.CoreCompileInputs.cache index 049034e..3e9cabc 100644 --- a/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.csproj.CoreCompileInputs.cache +++ b/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -ec0c9f9616413a3e870e39be02cabdc6e28948e1 +3fba9741251c0631b0ced8a9aa8468e0da6938c3 diff --git a/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.csproj.FileListAbsolute.txt b/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.csproj.FileListAbsolute.txt index d5e6c39..fb4bab2 100644 --- a/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.csproj.FileListAbsolute.txt +++ b/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.csproj.FileListAbsolute.txt @@ -73,3 +73,5 @@ C:\Users\Allthebest\Desktop\InveonHomeworks\Week7\FootballManager\FootballManage C:\Users\Allthebest\Desktop\InveonHomeworks\Week7\FootballManager\FootballManager.API\bin\Debug\net5.0\Microsoft.EntityFrameworkCore.Design.dll C:\Users\Allthebest\Desktop\InveonHomeworks\Week7\FootballManager\FootballManager.API\bin\Debug\net5.0\FootballManager.Core.dll C:\Users\Allthebest\Desktop\InveonHomeworks\Week7\FootballManager\FootballManager.API\bin\Debug\net5.0\FootballManager.Core.pdb +C:\Users\Allthebest\Desktop\InveonHomeworks\Week7\FootballManager\FootballManager.API\bin\Debug\net5.0\AutoMapper.dll +C:\Users\Allthebest\Desktop\InveonHomeworks\Week7\FootballManager\FootballManager.API\bin\Debug\net5.0\AutoMapper.Extensions.Microsoft.DependencyInjection.dll diff --git a/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.csprojAssemblyReference.cache b/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.csprojAssemblyReference.cache index fc40468..3cda6e7 100644 Binary files a/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.csprojAssemblyReference.cache and b/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.csprojAssemblyReference.cache differ diff --git a/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.dll b/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.dll index 831ccf0..69c6b0b 100644 Binary files a/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.dll and b/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.dll differ diff --git a/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.pdb b/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.pdb index 619ee95..b3943bb 100644 Binary files a/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.pdb and b/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/FootballManager.API.pdb differ diff --git a/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/ref/FootballManager.API.dll b/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/ref/FootballManager.API.dll index 7abd7f6..30fd030 100644 Binary files a/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/ref/FootballManager.API.dll and b/Week7/FootballManager/FootballManager.API/obj/Debug/net5.0/ref/FootballManager.API.dll differ diff --git a/Week7/FootballManager/FootballManager.API/obj/FootballManager.API.csproj.nuget.dgspec.json b/Week7/FootballManager/FootballManager.API/obj/FootballManager.API.csproj.nuget.dgspec.json index e6b06bb..bd466fa 100644 --- a/Week7/FootballManager/FootballManager.API/obj/FootballManager.API.csproj.nuget.dgspec.json +++ b/Week7/FootballManager/FootballManager.API/obj/FootballManager.API.csproj.nuget.dgspec.json @@ -47,6 +47,14 @@ "net5.0": { "targetAlias": "net5.0", "dependencies": { + "AutoMapper": { + "target": "Package", + "version": "[10.1.1, )" + }, + "AutoMapper.Extensions.Microsoft.DependencyInjection": { + "target": "Package", + "version": "[8.1.1, )" + }, "Microsoft.EntityFrameworkCore": { "target": "Package", "version": "[5.0.12, )" @@ -323,6 +331,14 @@ "net5.0": { "targetAlias": "net5.0", "dependencies": { + "AutoMapper": { + "target": "Package", + "version": "[10.1.1, )" + }, + "AutoMapper.Extensions.Microsoft.DependencyInjection": { + "target": "Package", + "version": "[8.1.1, )" + }, "Microsoft.Extensions.DependencyInjection.Abstractions": { "target": "Package", "version": "[6.0.0, )" diff --git a/Week7/FootballManager/FootballManager.API/obj/project.assets.json b/Week7/FootballManager/FootballManager.API/obj/project.assets.json index cc00e4b..bd7d18e 100644 --- a/Week7/FootballManager/FootballManager.API/obj/project.assets.json +++ b/Week7/FootballManager/FootballManager.API/obj/project.assets.json @@ -2,6 +2,33 @@ "version": 3, "targets": { "net5.0": { + "AutoMapper/10.1.1": { + "type": "package", + "dependencies": { + "Microsoft.CSharp": "4.7.0", + "System.Reflection.Emit": "4.7.0" + }, + "compile": { + "lib/netstandard2.0/AutoMapper.dll": {} + }, + "runtime": { + "lib/netstandard2.0/AutoMapper.dll": {} + } + }, + "AutoMapper.Extensions.Microsoft.DependencyInjection/8.1.1": { + "type": "package", + "dependencies": { + "AutoMapper": "[10.1.1, 11.0.0)", + "Microsoft.Extensions.DependencyInjection.Abstractions": "3.0.0", + "Microsoft.Extensions.Options": "3.0.0" + }, + "compile": { + "lib/netstandard2.0/AutoMapper.Extensions.Microsoft.DependencyInjection.dll": {} + }, + "runtime": { + "lib/netstandard2.0/AutoMapper.Extensions.Microsoft.DependencyInjection.dll": {} + } + }, "Humanizer.Core/2.8.26": { "type": "package", "compile": { @@ -977,20 +1004,13 @@ "ref/netstandard1.5/System.Reflection.dll": {} } }, - "System.Reflection.Emit/4.3.0": { + "System.Reflection.Emit/4.7.0": { "type": "package", - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - }, "compile": { - "ref/netstandard1.1/_._": {} + "ref/netcoreapp2.0/_._": {} }, "runtime": { - "lib/netstandard1.3/System.Reflection.Emit.dll": {} + "lib/netcoreapp2.0/_._": {} } }, "System.Reflection.Emit.ILGeneration/4.3.0": { @@ -1578,6 +1598,8 @@ "type": "project", "framework": ".NETCoreApp,Version=v5.0", "dependencies": { + "AutoMapper": "10.1.1", + "AutoMapper.Extensions.Microsoft.DependencyInjection": "8.1.1", "FootballManager.Data": "1.0.0", "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", "System.Configuration.ConfigurationManager": "6.0.0" @@ -1592,6 +1614,35 @@ } }, "libraries": { + "AutoMapper/10.1.1": { + "sha512": "uMgbqOdu9ZG5cIOty0C85hzzayBH2i9BthnS5FlMqKtMSHDv4ts81a2jS1VFaDBVhlBeIqJ/kQKjQY95BZde9w==", + "type": "package", + "path": "automapper/10.1.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "automapper.10.1.1.nupkg.sha512", + "automapper.nuspec", + "icon.png", + "lib/net461/AutoMapper.dll", + "lib/net461/AutoMapper.xml", + "lib/netstandard2.0/AutoMapper.dll", + "lib/netstandard2.0/AutoMapper.xml" + ] + }, + "AutoMapper.Extensions.Microsoft.DependencyInjection/8.1.1": { + "sha512": "xSWoVzOipuDU4PeZcUfaZQ+xqXU8QmGv5jrdlxt3MYm9xaOmrefqcfzGQ3SQ+D+8wfBa/ZwSuL0qKOVj080inA==", + "type": "package", + "path": "automapper.extensions.microsoft.dependencyinjection/8.1.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "automapper.extensions.microsoft.dependencyinjection.8.1.1.nupkg.sha512", + "automapper.extensions.microsoft.dependencyinjection.nuspec", + "icon.png", + "lib/netstandard2.0/AutoMapper.Extensions.Microsoft.DependencyInjection.dll" + ] + }, "Humanizer.Core/2.8.26": { "sha512": "OiKusGL20vby4uDEswj2IgkdchC1yQ6rwbIkZDVBPIR6al2b7n3pC91elBul9q33KaBgRKhbZH3+2Ur4fnWx2A==", "type": "package", @@ -3936,25 +3987,34 @@ "system.reflection.nuspec" ] }, - "System.Reflection.Emit/4.3.0": { - "sha512": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", + "System.Reflection.Emit/4.7.0": { + "sha512": "VR4kk8XLKebQ4MZuKuIni/7oh+QGFmZW3qORd1GvBq/8026OpW501SzT/oypwiQl4TvT8ErnReh/NzY9u+C6wQ==", "type": "package", - "path": "system.reflection.emit/4.3.0", + "path": "system.reflection.emit/4.7.0", "files": [ ".nupkg.metadata", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", + ".signature.p7s", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", "lib/MonoAndroid10/_._", - "lib/monotouch10/_._", + "lib/MonoTouch10/_._", "lib/net45/_._", "lib/netcore50/System.Reflection.Emit.dll", + "lib/netcoreapp2.0/_._", + "lib/netstandard1.1/System.Reflection.Emit.dll", + "lib/netstandard1.1/System.Reflection.Emit.xml", "lib/netstandard1.3/System.Reflection.Emit.dll", + "lib/netstandard2.0/System.Reflection.Emit.dll", + "lib/netstandard2.0/System.Reflection.Emit.xml", + "lib/netstandard2.1/_._", "lib/xamarinios10/_._", "lib/xamarinmac20/_._", "lib/xamarintvos10/_._", "lib/xamarinwatchos10/_._", "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", "ref/net45/_._", + "ref/netcoreapp2.0/_._", "ref/netstandard1.1/System.Reflection.Emit.dll", "ref/netstandard1.1/System.Reflection.Emit.xml", "ref/netstandard1.1/de/System.Reflection.Emit.xml", @@ -3966,9 +4026,19 @@ "ref/netstandard1.1/ru/System.Reflection.Emit.xml", "ref/netstandard1.1/zh-hans/System.Reflection.Emit.xml", "ref/netstandard1.1/zh-hant/System.Reflection.Emit.xml", + "ref/netstandard2.0/System.Reflection.Emit.dll", + "ref/netstandard2.0/System.Reflection.Emit.xml", + "ref/netstandard2.1/_._", + "ref/xamarinios10/_._", "ref/xamarinmac20/_._", - "system.reflection.emit.4.3.0.nupkg.sha512", - "system.reflection.emit.nuspec" + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.Reflection.Emit.dll", + "runtimes/aot/lib/netcore50/System.Reflection.Emit.xml", + "system.reflection.emit.4.7.0.nupkg.sha512", + "system.reflection.emit.nuspec", + "useSharedDesignerContext.txt", + "version.txt" ] }, "System.Reflection.Emit.ILGeneration/4.3.0": { @@ -5816,6 +5886,8 @@ }, "projectFileDependencyGroups": { "net5.0": [ + "AutoMapper >= 10.1.1", + "AutoMapper.Extensions.Microsoft.DependencyInjection >= 8.1.1", "FootballManager.Service >= 1.0.0", "Microsoft.EntityFrameworkCore >= 5.0.12", "Microsoft.EntityFrameworkCore.Design >= 5.0.12" @@ -5868,6 +5940,14 @@ "net5.0": { "targetAlias": "net5.0", "dependencies": { + "AutoMapper": { + "target": "Package", + "version": "[10.1.1, )" + }, + "AutoMapper.Extensions.Microsoft.DependencyInjection": { + "target": "Package", + "version": "[8.1.1, )" + }, "Microsoft.EntityFrameworkCore": { "target": "Package", "version": "[5.0.12, )" diff --git a/Week7/FootballManager/FootballManager.API/obj/project.nuget.cache b/Week7/FootballManager/FootballManager.API/obj/project.nuget.cache index 3bc3137..e32576c 100644 --- a/Week7/FootballManager/FootballManager.API/obj/project.nuget.cache +++ b/Week7/FootballManager/FootballManager.API/obj/project.nuget.cache @@ -1,9 +1,11 @@ { "version": 2, - "dgSpecHash": "Jgep+9iLGLqfZns2dUkWPpUU/M/lDNzh6ASgrypUXnsZ4SzW1up7q6Qw6SwY2R92B1d790Z02VYDfseMEy8rUg==", + "dgSpecHash": "qFjvgAq+DKJ/ztIWSxtj3TTtxBwH6PdopIDxDQFbjvt3OmUi3la0QMSsE7NNgYZSh5n79+6WzFYKUAg3LzYJzg==", "success": true, "projectFilePath": "C:\\Users\\Allthebest\\Desktop\\InveonHomeworks\\Week7\\FootballManager\\FootballManager.API\\FootballManager.API.csproj", "expectedPackageFiles": [ + "C:\\Users\\Allthebest\\.nuget\\packages\\automapper\\10.1.1\\automapper.10.1.1.nupkg.sha512", + "C:\\Users\\Allthebest\\.nuget\\packages\\automapper.extensions.microsoft.dependencyinjection\\8.1.1\\automapper.extensions.microsoft.dependencyinjection.8.1.1.nupkg.sha512", "C:\\Users\\Allthebest\\.nuget\\packages\\humanizer.core\\2.8.26\\humanizer.core.2.8.26.nupkg.sha512", "C:\\Users\\Allthebest\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512", "C:\\Users\\Allthebest\\.nuget\\packages\\microsoft.data.sqlclient\\2.0.1\\microsoft.data.sqlclient.2.0.1.nupkg.sha512", @@ -66,7 +68,7 @@ "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.private.datacontractserialization\\4.3.0\\system.private.datacontractserialization.4.3.0.nupkg.sha512", "C:\\Users\\Allthebest\\.nuget\\packages\\system.private.uri\\4.3.2\\system.private.uri.4.3.2.nupkg.sha512", "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection\\4.3.0\\system.reflection.4.3.0.nupkg.sha512", - "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit\\4.3.0\\system.reflection.emit.4.3.0.nupkg.sha512", + "C:\\Users\\Allthebest\\.nuget\\packages\\system.reflection.emit\\4.7.0\\system.reflection.emit.4.7.0.nupkg.sha512", "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit.ilgeneration\\4.3.0\\system.reflection.emit.ilgeneration.4.3.0.nupkg.sha512", "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit.lightweight\\4.3.0\\system.reflection.emit.lightweight.4.3.0.nupkg.sha512", "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.extensions\\4.3.0\\system.reflection.extensions.4.3.0.nupkg.sha512", diff --git a/Week7/FootballManager/FootballManager.Core/bin/Debug/net5.0/FootballManager.Core.dll b/Week7/FootballManager/FootballManager.Core/bin/Debug/net5.0/FootballManager.Core.dll index dc2ddc7..50b81e9 100644 Binary files a/Week7/FootballManager/FootballManager.Core/bin/Debug/net5.0/FootballManager.Core.dll and b/Week7/FootballManager/FootballManager.Core/bin/Debug/net5.0/FootballManager.Core.dll differ diff --git a/Week7/FootballManager/FootballManager.Core/bin/Debug/net5.0/FootballManager.Core.pdb b/Week7/FootballManager/FootballManager.Core/bin/Debug/net5.0/FootballManager.Core.pdb index 72fd30b..a7f8626 100644 Binary files a/Week7/FootballManager/FootballManager.Core/bin/Debug/net5.0/FootballManager.Core.pdb and b/Week7/FootballManager/FootballManager.Core/bin/Debug/net5.0/FootballManager.Core.pdb differ diff --git a/Week7/FootballManager/FootballManager.Core/bin/Debug/net5.0/FootballManager.Entities.dll b/Week7/FootballManager/FootballManager.Core/bin/Debug/net5.0/FootballManager.Entities.dll index d4df665..8b9ad52 100644 Binary files a/Week7/FootballManager/FootballManager.Core/bin/Debug/net5.0/FootballManager.Entities.dll and b/Week7/FootballManager/FootballManager.Core/bin/Debug/net5.0/FootballManager.Entities.dll differ diff --git a/Week7/FootballManager/FootballManager.Core/bin/Debug/net5.0/FootballManager.Entities.pdb b/Week7/FootballManager/FootballManager.Core/bin/Debug/net5.0/FootballManager.Entities.pdb index 55c8189..e3e2f5a 100644 Binary files a/Week7/FootballManager/FootballManager.Core/bin/Debug/net5.0/FootballManager.Entities.pdb and b/Week7/FootballManager/FootballManager.Core/bin/Debug/net5.0/FootballManager.Entities.pdb differ diff --git a/Week7/FootballManager/FootballManager.Core/obj/Debug/net5.0/FootballManager.Core.csprojAssemblyReference.cache b/Week7/FootballManager/FootballManager.Core/obj/Debug/net5.0/FootballManager.Core.csprojAssemblyReference.cache index 5aae1ae..9e9ee26 100644 Binary files a/Week7/FootballManager/FootballManager.Core/obj/Debug/net5.0/FootballManager.Core.csprojAssemblyReference.cache and b/Week7/FootballManager/FootballManager.Core/obj/Debug/net5.0/FootballManager.Core.csprojAssemblyReference.cache differ diff --git a/Week7/FootballManager/FootballManager.Core/obj/Debug/net5.0/FootballManager.Core.dll b/Week7/FootballManager/FootballManager.Core/obj/Debug/net5.0/FootballManager.Core.dll index dc2ddc7..50b81e9 100644 Binary files a/Week7/FootballManager/FootballManager.Core/obj/Debug/net5.0/FootballManager.Core.dll and b/Week7/FootballManager/FootballManager.Core/obj/Debug/net5.0/FootballManager.Core.dll differ diff --git a/Week7/FootballManager/FootballManager.Core/obj/Debug/net5.0/FootballManager.Core.pdb b/Week7/FootballManager/FootballManager.Core/obj/Debug/net5.0/FootballManager.Core.pdb index 72fd30b..a7f8626 100644 Binary files a/Week7/FootballManager/FootballManager.Core/obj/Debug/net5.0/FootballManager.Core.pdb and b/Week7/FootballManager/FootballManager.Core/obj/Debug/net5.0/FootballManager.Core.pdb differ diff --git a/Week7/FootballManager/FootballManager.Data/Migrations/20211204010913_updatedFootballer.Designer.cs b/Week7/FootballManager/FootballManager.Data/Migrations/20211204010913_updatedFootballer.Designer.cs new file mode 100644 index 0000000..4bf3856 --- /dev/null +++ b/Week7/FootballManager/FootballManager.Data/Migrations/20211204010913_updatedFootballer.Designer.cs @@ -0,0 +1,306 @@ +// +using System; +using FootballManager.Data.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace FootballManager.Data.Migrations +{ + [DbContext(typeof(FootballDbContext))] + [Migration("20211204010913_updatedFootballer")] + partial class updatedFootballer + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.12") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("FootballManager.Entities.Coach", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdatedDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("Coaches"); + }); + + modelBuilder.Entity("FootballManager.Entities.Footballer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("ManagerId") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("NationalTeamId") + .HasColumnType("int"); + + b.Property("TeamId") + .HasColumnType("int"); + + b.Property("UpdatedDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("ManagerId"); + + b.HasIndex("NationalTeamId"); + + b.HasIndex("TeamId"); + + b.ToTable("Footballers"); + }); + + modelBuilder.Entity("FootballManager.Entities.ManagementPosition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdatedDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("ManagementPositions"); + }); + + modelBuilder.Entity("FootballManager.Entities.Manager", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("BirthDate") + .HasColumnType("datetime2"); + + b.Property("ManagementPositionId") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdatedDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("ManagementPositionId"); + + b.ToTable("Managers"); + }); + + modelBuilder.Entity("FootballManager.Entities.Position", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdatedDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("Positions"); + }); + + modelBuilder.Entity("FootballManager.Entities.Tactic", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("CoachId") + .HasColumnType("int"); + + b.Property("FormatPlan") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdatedDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CoachId"); + + b.ToTable("Tactics"); + }); + + modelBuilder.Entity("FootballManager.Entities.Team", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("CoachId") + .HasColumnType("int"); + + b.Property("Discriminator") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("FoundingYear") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdatedDate") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("CoachId") + .IsUnique(); + + b.ToTable("Teams"); + + b.HasDiscriminator("Discriminator").HasValue("Team"); + }); + + modelBuilder.Entity("FootballerPosition", b => + { + b.Property("FootballersId") + .HasColumnType("int"); + + b.Property("PositionsId") + .HasColumnType("int"); + + b.HasKey("FootballersId", "PositionsId"); + + b.HasIndex("PositionsId"); + + b.ToTable("FootballerPosition"); + }); + + modelBuilder.Entity("FootballManager.Entities.NationalTeam", b => + { + b.HasBaseType("FootballManager.Entities.Team"); + + b.Property("Nation") + .HasColumnType("nvarchar(max)"); + + b.HasDiscriminator().HasValue("NationalTeam"); + }); + + modelBuilder.Entity("FootballManager.Entities.Footballer", b => + { + b.HasOne("FootballManager.Entities.Manager", "Manager") + .WithMany("Footballers") + .HasForeignKey("ManagerId"); + + b.HasOne("FootballManager.Entities.NationalTeam", "NationalTeam") + .WithMany() + .HasForeignKey("NationalTeamId"); + + b.HasOne("FootballManager.Entities.Team", "Team") + .WithMany("Footballers") + .HasForeignKey("TeamId"); + + b.Navigation("Manager"); + + b.Navigation("NationalTeam"); + + b.Navigation("Team"); + }); + + modelBuilder.Entity("FootballManager.Entities.Manager", b => + { + b.HasOne("FootballManager.Entities.ManagementPosition", "ManagementPosition") + .WithMany() + .HasForeignKey("ManagementPositionId"); + + b.Navigation("ManagementPosition"); + }); + + modelBuilder.Entity("FootballManager.Entities.Tactic", b => + { + b.HasOne("FootballManager.Entities.Coach", null) + .WithMany("Tactics") + .HasForeignKey("CoachId"); + }); + + modelBuilder.Entity("FootballManager.Entities.Team", b => + { + b.HasOne("FootballManager.Entities.Coach", "Coach") + .WithOne("Team") + .HasForeignKey("FootballManager.Entities.Team", "CoachId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Coach"); + }); + + modelBuilder.Entity("FootballerPosition", b => + { + b.HasOne("FootballManager.Entities.Footballer", null) + .WithMany() + .HasForeignKey("FootballersId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("FootballManager.Entities.Position", null) + .WithMany() + .HasForeignKey("PositionsId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("FootballManager.Entities.Coach", b => + { + b.Navigation("Tactics"); + + b.Navigation("Team"); + }); + + modelBuilder.Entity("FootballManager.Entities.Manager", b => + { + b.Navigation("Footballers"); + }); + + modelBuilder.Entity("FootballManager.Entities.Team", b => + { + b.Navigation("Footballers"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Week7/FootballManager/FootballManager.Data/Migrations/20211204010913_updatedFootballer.cs b/Week7/FootballManager/FootballManager.Data/Migrations/20211204010913_updatedFootballer.cs new file mode 100644 index 0000000..594c07e --- /dev/null +++ b/Week7/FootballManager/FootballManager.Data/Migrations/20211204010913_updatedFootballer.cs @@ -0,0 +1,17 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace FootballManager.Data.Migrations +{ + public partial class updatedFootballer : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + + } + } +} diff --git a/Week7/FootballManager/FootballManager.Data/Migrations/FootballDbContextModelSnapshot.cs b/Week7/FootballManager/FootballManager.Data/Migrations/FootballDbContextModelSnapshot.cs index 1f4acce..e00bbb8 100644 --- a/Week7/FootballManager/FootballManager.Data/Migrations/FootballDbContextModelSnapshot.cs +++ b/Week7/FootballManager/FootballManager.Data/Migrations/FootballDbContextModelSnapshot.cs @@ -221,7 +221,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) modelBuilder.Entity("FootballManager.Entities.Footballer", b => { - b.HasOne("FootballManager.Entities.Manager", null) + b.HasOne("FootballManager.Entities.Manager", "Manager") .WithMany("Footballers") .HasForeignKey("ManagerId"); @@ -233,6 +233,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany("Footballers") .HasForeignKey("TeamId"); + b.Navigation("Manager"); + b.Navigation("NationalTeam"); b.Navigation("Team"); diff --git a/Week7/FootballManager/FootballManager.Data/UnitOfWork/UnitOfWork.cs b/Week7/FootballManager/FootballManager.Data/UnitOfWork/UnitOfWork.cs index 04a0e06..c8a5a6e 100644 --- a/Week7/FootballManager/FootballManager.Data/UnitOfWork/UnitOfWork.cs +++ b/Week7/FootballManager/FootballManager.Data/UnitOfWork/UnitOfWork.cs @@ -14,7 +14,7 @@ namespace FootballManager.Data.UnitOfWork public class UnitOfWork : IUnitOfWork { private readonly FootballDbContext _context; - private Dictionary _repositories; + private Dictionary _repositories = new Dictionary(); public UnitOfWork(FootballDbContext context) { diff --git a/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Core.dll b/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Core.dll index dc2ddc7..50b81e9 100644 Binary files a/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Core.dll and b/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Core.dll differ diff --git a/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Core.pdb b/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Core.pdb index 72fd30b..a7f8626 100644 Binary files a/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Core.pdb and b/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Core.pdb differ diff --git a/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Data.dll b/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Data.dll index 35704b3..793cd78 100644 Binary files a/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Data.dll and b/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Data.dll differ diff --git a/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Data.pdb b/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Data.pdb index ef579f6..49f034d 100644 Binary files a/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Data.pdb and b/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Data.pdb differ diff --git a/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Entities.dll b/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Entities.dll index d4df665..8b9ad52 100644 Binary files a/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Entities.dll and b/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Entities.dll differ diff --git a/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Entities.pdb b/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Entities.pdb index 55c8189..e3e2f5a 100644 Binary files a/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Entities.pdb and b/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/FootballManager.Entities.pdb differ diff --git a/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/ref/FootballManager.Data.dll b/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/ref/FootballManager.Data.dll index 42fe3c0..6dfa695 100644 Binary files a/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/ref/FootballManager.Data.dll and b/Week7/FootballManager/FootballManager.Data/bin/Debug/net5.0/ref/FootballManager.Data.dll differ diff --git a/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/FootballManager.Data.csproj.CoreCompileInputs.cache b/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/FootballManager.Data.csproj.CoreCompileInputs.cache index d5e7fbd..ddedfac 100644 --- a/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/FootballManager.Data.csproj.CoreCompileInputs.cache +++ b/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/FootballManager.Data.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -a8cb66ae6e631e08af07d138d00fbdc3adbe6948 +b33e9cef49151d074e96ab46bd62ebba02950533 diff --git a/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/FootballManager.Data.csprojAssemblyReference.cache b/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/FootballManager.Data.csprojAssemblyReference.cache index 31e6c8f..40b9617 100644 Binary files a/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/FootballManager.Data.csprojAssemblyReference.cache and b/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/FootballManager.Data.csprojAssemblyReference.cache differ diff --git a/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/FootballManager.Data.dll b/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/FootballManager.Data.dll index 35704b3..793cd78 100644 Binary files a/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/FootballManager.Data.dll and b/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/FootballManager.Data.dll differ diff --git a/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/FootballManager.Data.pdb b/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/FootballManager.Data.pdb index ef579f6..49f034d 100644 Binary files a/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/FootballManager.Data.pdb and b/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/FootballManager.Data.pdb differ diff --git a/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/ref/FootballManager.Data.dll b/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/ref/FootballManager.Data.dll index 42fe3c0..6dfa695 100644 Binary files a/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/ref/FootballManager.Data.dll and b/Week7/FootballManager/FootballManager.Data/obj/Debug/net5.0/ref/FootballManager.Data.dll differ diff --git a/Week7/FootballManager/FootballManager.Entities/Footballer.cs b/Week7/FootballManager/FootballManager.Entities/Footballer.cs index 5c7650e..4cd812d 100644 --- a/Week7/FootballManager/FootballManager.Entities/Footballer.cs +++ b/Week7/FootballManager/FootballManager.Entities/Footballer.cs @@ -12,6 +12,7 @@ public class Footballer : Person public ICollection Positions { get; set; } public Team Team { get; set; } public NationalTeam NationalTeam { get; set; } + public Manager Manager { get; set; } } diff --git a/Week7/FootballManager/FootballManager.Entities/bin/Debug/net5.0/FootballManager.Entities.dll b/Week7/FootballManager/FootballManager.Entities/bin/Debug/net5.0/FootballManager.Entities.dll index d4df665..8b9ad52 100644 Binary files a/Week7/FootballManager/FootballManager.Entities/bin/Debug/net5.0/FootballManager.Entities.dll and b/Week7/FootballManager/FootballManager.Entities/bin/Debug/net5.0/FootballManager.Entities.dll differ diff --git a/Week7/FootballManager/FootballManager.Entities/bin/Debug/net5.0/FootballManager.Entities.pdb b/Week7/FootballManager/FootballManager.Entities/bin/Debug/net5.0/FootballManager.Entities.pdb index 55c8189..e3e2f5a 100644 Binary files a/Week7/FootballManager/FootballManager.Entities/bin/Debug/net5.0/FootballManager.Entities.pdb and b/Week7/FootballManager/FootballManager.Entities/bin/Debug/net5.0/FootballManager.Entities.pdb differ diff --git a/Week7/FootballManager/FootballManager.Entities/bin/Debug/net5.0/ref/FootballManager.Entities.dll b/Week7/FootballManager/FootballManager.Entities/bin/Debug/net5.0/ref/FootballManager.Entities.dll index 624b63a..27f88d4 100644 Binary files a/Week7/FootballManager/FootballManager.Entities/bin/Debug/net5.0/ref/FootballManager.Entities.dll and b/Week7/FootballManager/FootballManager.Entities/bin/Debug/net5.0/ref/FootballManager.Entities.dll differ diff --git a/Week7/FootballManager/FootballManager.Entities/obj/Debug/net5.0/FootballManager.Entities.dll b/Week7/FootballManager/FootballManager.Entities/obj/Debug/net5.0/FootballManager.Entities.dll index d4df665..8b9ad52 100644 Binary files a/Week7/FootballManager/FootballManager.Entities/obj/Debug/net5.0/FootballManager.Entities.dll and b/Week7/FootballManager/FootballManager.Entities/obj/Debug/net5.0/FootballManager.Entities.dll differ diff --git a/Week7/FootballManager/FootballManager.Entities/obj/Debug/net5.0/FootballManager.Entities.pdb b/Week7/FootballManager/FootballManager.Entities/obj/Debug/net5.0/FootballManager.Entities.pdb index 55c8189..e3e2f5a 100644 Binary files a/Week7/FootballManager/FootballManager.Entities/obj/Debug/net5.0/FootballManager.Entities.pdb and b/Week7/FootballManager/FootballManager.Entities/obj/Debug/net5.0/FootballManager.Entities.pdb differ diff --git a/Week7/FootballManager/FootballManager.Entities/obj/Debug/net5.0/ref/FootballManager.Entities.dll b/Week7/FootballManager/FootballManager.Entities/obj/Debug/net5.0/ref/FootballManager.Entities.dll index 624b63a..27f88d4 100644 Binary files a/Week7/FootballManager/FootballManager.Entities/obj/Debug/net5.0/ref/FootballManager.Entities.dll and b/Week7/FootballManager/FootballManager.Entities/obj/Debug/net5.0/ref/FootballManager.Entities.dll differ diff --git a/Week7/FootballManager/FootballManager.Service/DTOs/Footballer/AddFootballerDTO.cs b/Week7/FootballManager/FootballManager.Service/DTOs/Footballer/AddFootballerDTO.cs new file mode 100644 index 0000000..5d8d2b1 --- /dev/null +++ b/Week7/FootballManager/FootballManager.Service/DTOs/Footballer/AddFootballerDTO.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FootballManager.Service.DTOs.Footballer +{ + public class AddFootballerDTO + { + public string Name { get; set; } + + + + } +} diff --git a/Week7/FootballManager/FootballManager.Service/DTOs/Footballer/UpdateFootballerDTO.cs b/Week7/FootballManager/FootballManager.Service/DTOs/Footballer/UpdateFootballerDTO.cs new file mode 100644 index 0000000..3a1486e --- /dev/null +++ b/Week7/FootballManager/FootballManager.Service/DTOs/Footballer/UpdateFootballerDTO.cs @@ -0,0 +1,16 @@ +using FootballManager.Entities; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FootballManager.Service.DTOs.Footballer +{ + public class UpdateFootballerDTO + { + public int Id { get; set; } + public string Name { get; set; } + public Manager Manager{ get; set; } + } +} diff --git a/Week7/FootballManager/FootballManager.Service/FootballManager.Service.csproj b/Week7/FootballManager/FootballManager.Service/FootballManager.Service.csproj index 2c0c0ac..6af787b 100644 --- a/Week7/FootballManager/FootballManager.Service/FootballManager.Service.csproj +++ b/Week7/FootballManager/FootballManager.Service/FootballManager.Service.csproj @@ -5,6 +5,8 @@ + + @@ -13,4 +15,8 @@ + + + + diff --git a/Week7/FootballManager/FootballManager.Service/Implementation/FootballerService.cs b/Week7/FootballManager/FootballManager.Service/Implementation/FootballerService.cs index e84ba13..f7342cd 100644 --- a/Week7/FootballManager/FootballManager.Service/Implementation/FootballerService.cs +++ b/Week7/FootballManager/FootballManager.Service/Implementation/FootballerService.cs @@ -26,6 +26,8 @@ public FootballerService(IUnitOfWork unitofwork) public async Task AddAsync(Footballer entity) { await _repo.AddAsync(entity); + await _unitOfWork.CommitAsync(); + Console.WriteLine(entity.CreatedDate); } public IQueryable Get(Expression> predicate) @@ -50,7 +52,10 @@ public Task SingleOrDefaultAsync(Expression> public Footballer Update(Footballer entity) { - throw new NotImplementedException(); + _repo.Update(entity); + _unitOfWork.Commit(); + return entity; + } } } diff --git a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Core.dll b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Core.dll index dc2ddc7..50b81e9 100644 Binary files a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Core.dll and b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Core.dll differ diff --git a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Core.pdb b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Core.pdb index 72fd30b..a7f8626 100644 Binary files a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Core.pdb and b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Core.pdb differ diff --git a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Data.dll b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Data.dll index 35704b3..793cd78 100644 Binary files a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Data.dll and b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Data.dll differ diff --git a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Data.pdb b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Data.pdb index ef579f6..49f034d 100644 Binary files a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Data.pdb and b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Data.pdb differ diff --git a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Entities.dll b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Entities.dll index d4df665..8b9ad52 100644 Binary files a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Entities.dll and b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Entities.dll differ diff --git a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Entities.pdb b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Entities.pdb index 55c8189..e3e2f5a 100644 Binary files a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Entities.pdb and b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Entities.pdb differ diff --git a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Service.deps.json b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Service.deps.json index 6f19276..e7dffc9 100644 --- a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Service.deps.json +++ b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Service.deps.json @@ -8,6 +8,8 @@ ".NETCoreApp,Version=v5.0": { "FootballManager.Service/1.0.0": { "dependencies": { + "AutoMapper": "10.1.1", + "AutoMapper.Extensions.Microsoft.DependencyInjection": "8.1.1", "FootballManager.Data": "1.0.0", "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", "System.Configuration.ConfigurationManager": "6.0.0" @@ -16,7 +18,32 @@ "FootballManager.Service.dll": {} } }, - "Microsoft.CSharp/4.5.0": {}, + "AutoMapper/10.1.1": { + "dependencies": { + "Microsoft.CSharp": "4.7.0", + "System.Reflection.Emit": "4.7.0" + }, + "runtime": { + "lib/netstandard2.0/AutoMapper.dll": { + "assemblyVersion": "10.0.0.0", + "fileVersion": "10.1.1.0" + } + } + }, + "AutoMapper.Extensions.Microsoft.DependencyInjection/8.1.1": { + "dependencies": { + "AutoMapper": "10.1.1", + "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", + "Microsoft.Extensions.Options": "5.0.0" + }, + "runtime": { + "lib/netstandard2.0/AutoMapper.Extensions.Microsoft.DependencyInjection.dll": { + "assemblyVersion": "8.0.0.0", + "fileVersion": "8.1.1.0" + } + } + }, + "Microsoft.CSharp/4.7.0": {}, "Microsoft.Data.SqlClient/2.0.1": { "dependencies": { "Microsoft.Data.SqlClient.SNI.runtime": "2.0.1", @@ -246,7 +273,7 @@ }, "Microsoft.Identity.Client/4.14.0": { "dependencies": { - "Microsoft.CSharp": "4.5.0", + "Microsoft.CSharp": "4.7.0", "System.ComponentModel.TypeConverter": "4.3.0", "System.Net.NameResolution": "4.3.0", "System.Private.Uri": "4.3.2", @@ -347,7 +374,7 @@ }, "Newtonsoft.Json/10.0.1": { "dependencies": { - "Microsoft.CSharp": "4.5.0", + "Microsoft.CSharp": "4.7.0", "System.Collections": "4.3.0", "System.ComponentModel.TypeConverter": "4.3.0", "System.Diagnostics.Debug": "4.3.0", @@ -536,7 +563,7 @@ "System.Linq.Expressions": "4.3.0", "System.ObjectModel": "4.3.0", "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", + "System.Reflection.Emit": "4.7.0", "System.Reflection.Emit.ILGeneration": "4.3.0", "System.Reflection.Primitives": "4.3.0", "System.Reflection.TypeExtensions": "4.3.0", @@ -620,7 +647,7 @@ "System.Linq": "4.3.0", "System.ObjectModel": "4.3.0", "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", + "System.Reflection.Emit": "4.7.0", "System.Reflection.Emit.ILGeneration": "4.3.0", "System.Reflection.Emit.Lightweight": "4.3.0", "System.Reflection.Extensions": "4.3.0", @@ -712,15 +739,7 @@ "System.Runtime": "4.3.0" } }, - "System.Reflection.Emit/4.3.0": { - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, + "System.Reflection.Emit/4.7.0": {}, "System.Reflection.Emit.ILGeneration/4.3.0": { "dependencies": { "System.Reflection": "4.3.0", @@ -1040,7 +1059,7 @@ "System.IO": "4.3.0", "System.Linq": "4.3.0", "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", + "System.Reflection.Emit": "4.7.0", "System.Reflection.Emit.ILGeneration": "4.3.0", "System.Reflection.Extensions": "4.3.0", "System.Reflection.Primitives": "4.3.0", @@ -1085,12 +1104,26 @@ "serviceable": false, "sha512": "" }, - "Microsoft.CSharp/4.5.0": { + "AutoMapper/10.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-uMgbqOdu9ZG5cIOty0C85hzzayBH2i9BthnS5FlMqKtMSHDv4ts81a2jS1VFaDBVhlBeIqJ/kQKjQY95BZde9w==", + "path": "automapper/10.1.1", + "hashPath": "automapper.10.1.1.nupkg.sha512" + }, + "AutoMapper.Extensions.Microsoft.DependencyInjection/8.1.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-xSWoVzOipuDU4PeZcUfaZQ+xqXU8QmGv5jrdlxt3MYm9xaOmrefqcfzGQ3SQ+D+8wfBa/ZwSuL0qKOVj080inA==", + "path": "automapper.extensions.microsoft.dependencyinjection/8.1.1", + "hashPath": "automapper.extensions.microsoft.dependencyinjection.8.1.1.nupkg.sha512" + }, + "Microsoft.CSharp/4.7.0": { "type": "package", "serviceable": true, - "sha512": "sha512-kaj6Wb4qoMuH3HySFJhxwQfe8R/sJsNJnANrvv8WdFPMoNbKY5htfNscv+LHCu5ipz+49m2e+WQXpLXr9XYemQ==", - "path": "microsoft.csharp/4.5.0", - "hashPath": "microsoft.csharp.4.5.0.nupkg.sha512" + "sha512": "sha512-pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA==", + "path": "microsoft.csharp/4.7.0", + "hashPath": "microsoft.csharp.4.7.0.nupkg.sha512" }, "Microsoft.Data.SqlClient/2.0.1": { "type": "package", @@ -1505,12 +1538,12 @@ "path": "system.reflection/4.3.0", "hashPath": "system.reflection.4.3.0.nupkg.sha512" }, - "System.Reflection.Emit/4.3.0": { + "System.Reflection.Emit/4.7.0": { "type": "package", "serviceable": true, - "sha512": "sha512-228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", - "path": "system.reflection.emit/4.3.0", - "hashPath": "system.reflection.emit.4.3.0.nupkg.sha512" + "sha512": "sha512-VR4kk8XLKebQ4MZuKuIni/7oh+QGFmZW3qORd1GvBq/8026OpW501SzT/oypwiQl4TvT8ErnReh/NzY9u+C6wQ==", + "path": "system.reflection.emit/4.7.0", + "hashPath": "system.reflection.emit.4.7.0.nupkg.sha512" }, "System.Reflection.Emit.ILGeneration/4.3.0": { "type": "package", diff --git a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Service.dll b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Service.dll index a2a579b..16d4893 100644 Binary files a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Service.dll and b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Service.dll differ diff --git a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Service.pdb b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Service.pdb index 3c623da..b10d9d2 100644 Binary files a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Service.pdb and b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/FootballManager.Service.pdb differ diff --git a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/ref/FootballManager.Service.dll b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/ref/FootballManager.Service.dll index 578f78e..5778ecc 100644 Binary files a/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/ref/FootballManager.Service.dll and b/Week7/FootballManager/FootballManager.Service/bin/Debug/net5.0/ref/FootballManager.Service.dll differ diff --git a/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.assets.cache b/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.assets.cache index f53237d..971bd34 100644 Binary files a/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.assets.cache and b/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.assets.cache differ diff --git a/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.csproj.CoreCompileInputs.cache b/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.csproj.CoreCompileInputs.cache index 200906d..3dce1aa 100644 --- a/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.csproj.CoreCompileInputs.cache +++ b/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -7706da11dee05aa43ab15b96ed3bb6c97225fefc +e1f49f598c64fb38245259adcb34b1cbaec49905 diff --git a/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.csprojAssemblyReference.cache b/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.csprojAssemblyReference.cache index 5041e61..79bd44b 100644 Binary files a/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.csprojAssemblyReference.cache and b/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.csprojAssemblyReference.cache differ diff --git a/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.dll b/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.dll index a2a579b..16d4893 100644 Binary files a/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.dll and b/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.dll differ diff --git a/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.pdb b/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.pdb index 3c623da..b10d9d2 100644 Binary files a/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.pdb and b/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/FootballManager.Service.pdb differ diff --git a/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/ref/FootballManager.Service.dll b/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/ref/FootballManager.Service.dll index 578f78e..5778ecc 100644 Binary files a/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/ref/FootballManager.Service.dll and b/Week7/FootballManager/FootballManager.Service/obj/Debug/net5.0/ref/FootballManager.Service.dll differ diff --git a/Week7/FootballManager/FootballManager.Service/obj/FootballManager.Service.csproj.nuget.dgspec.json b/Week7/FootballManager/FootballManager.Service/obj/FootballManager.Service.csproj.nuget.dgspec.json index 015d671..cd5bd0f 100644 --- a/Week7/FootballManager/FootballManager.Service/obj/FootballManager.Service.csproj.nuget.dgspec.json +++ b/Week7/FootballManager/FootballManager.Service/obj/FootballManager.Service.csproj.nuget.dgspec.json @@ -247,6 +247,14 @@ "net5.0": { "targetAlias": "net5.0", "dependencies": { + "AutoMapper": { + "target": "Package", + "version": "[10.1.1, )" + }, + "AutoMapper.Extensions.Microsoft.DependencyInjection": { + "target": "Package", + "version": "[8.1.1, )" + }, "Microsoft.Extensions.DependencyInjection.Abstractions": { "target": "Package", "version": "[6.0.0, )" diff --git a/Week7/FootballManager/FootballManager.Service/obj/project.assets.json b/Week7/FootballManager/FootballManager.Service/obj/project.assets.json index 94917b8..c2bd9ed 100644 --- a/Week7/FootballManager/FootballManager.Service/obj/project.assets.json +++ b/Week7/FootballManager/FootballManager.Service/obj/project.assets.json @@ -2,7 +2,34 @@ "version": 3, "targets": { "net5.0": { - "Microsoft.CSharp/4.5.0": { + "AutoMapper/10.1.1": { + "type": "package", + "dependencies": { + "Microsoft.CSharp": "4.7.0", + "System.Reflection.Emit": "4.7.0" + }, + "compile": { + "lib/netstandard2.0/AutoMapper.dll": {} + }, + "runtime": { + "lib/netstandard2.0/AutoMapper.dll": {} + } + }, + "AutoMapper.Extensions.Microsoft.DependencyInjection/8.1.1": { + "type": "package", + "dependencies": { + "AutoMapper": "[10.1.1, 11.0.0)", + "Microsoft.Extensions.DependencyInjection.Abstractions": "3.0.0", + "Microsoft.Extensions.Options": "3.0.0" + }, + "compile": { + "lib/netstandard2.0/AutoMapper.Extensions.Microsoft.DependencyInjection.dll": {} + }, + "runtime": { + "lib/netstandard2.0/AutoMapper.Extensions.Microsoft.DependencyInjection.dll": {} + } + }, + "Microsoft.CSharp/4.7.0": { "type": "package", "compile": { "ref/netcoreapp2.0/_._": {} @@ -951,20 +978,13 @@ "ref/netstandard1.5/System.Reflection.dll": {} } }, - "System.Reflection.Emit/4.3.0": { + "System.Reflection.Emit/4.7.0": { "type": "package", - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - }, "compile": { - "ref/netstandard1.1/_._": {} + "ref/netcoreapp2.0/_._": {} }, "runtime": { - "lib/netstandard1.3/System.Reflection.Emit.dll": {} + "lib/netcoreapp2.0/_._": {} } }, "System.Reflection.Emit.ILGeneration/4.3.0": { @@ -1551,10 +1571,39 @@ } }, "libraries": { - "Microsoft.CSharp/4.5.0": { - "sha512": "kaj6Wb4qoMuH3HySFJhxwQfe8R/sJsNJnANrvv8WdFPMoNbKY5htfNscv+LHCu5ipz+49m2e+WQXpLXr9XYemQ==", + "AutoMapper/10.1.1": { + "sha512": "uMgbqOdu9ZG5cIOty0C85hzzayBH2i9BthnS5FlMqKtMSHDv4ts81a2jS1VFaDBVhlBeIqJ/kQKjQY95BZde9w==", "type": "package", - "path": "microsoft.csharp/4.5.0", + "path": "automapper/10.1.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "automapper.10.1.1.nupkg.sha512", + "automapper.nuspec", + "icon.png", + "lib/net461/AutoMapper.dll", + "lib/net461/AutoMapper.xml", + "lib/netstandard2.0/AutoMapper.dll", + "lib/netstandard2.0/AutoMapper.xml" + ] + }, + "AutoMapper.Extensions.Microsoft.DependencyInjection/8.1.1": { + "sha512": "xSWoVzOipuDU4PeZcUfaZQ+xqXU8QmGv5jrdlxt3MYm9xaOmrefqcfzGQ3SQ+D+8wfBa/ZwSuL0qKOVj080inA==", + "type": "package", + "path": "automapper.extensions.microsoft.dependencyinjection/8.1.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "automapper.extensions.microsoft.dependencyinjection.8.1.1.nupkg.sha512", + "automapper.extensions.microsoft.dependencyinjection.nuspec", + "icon.png", + "lib/netstandard2.0/AutoMapper.Extensions.Microsoft.DependencyInjection.dll" + ] + }, + "Microsoft.CSharp/4.7.0": { + "sha512": "pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA==", + "type": "package", + "path": "microsoft.csharp/4.7.0", "files": [ ".nupkg.metadata", ".signature.p7s", @@ -1567,6 +1616,7 @@ "lib/netcoreapp2.0/_._", "lib/netstandard1.3/Microsoft.CSharp.dll", "lib/netstandard2.0/Microsoft.CSharp.dll", + "lib/netstandard2.0/Microsoft.CSharp.xml", "lib/portable-net45+win8+wp8+wpa81/_._", "lib/uap10.0.16299/_._", "lib/win8/_._", @@ -1576,7 +1626,7 @@ "lib/xamarinmac20/_._", "lib/xamarintvos10/_._", "lib/xamarinwatchos10/_._", - "microsoft.csharp.4.5.0.nupkg.sha512", + "microsoft.csharp.4.7.0.nupkg.sha512", "microsoft.csharp.nuspec", "ref/MonoAndroid10/_._", "ref/MonoTouch10/_._", @@ -3863,25 +3913,34 @@ "system.reflection.nuspec" ] }, - "System.Reflection.Emit/4.3.0": { - "sha512": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", + "System.Reflection.Emit/4.7.0": { + "sha512": "VR4kk8XLKebQ4MZuKuIni/7oh+QGFmZW3qORd1GvBq/8026OpW501SzT/oypwiQl4TvT8ErnReh/NzY9u+C6wQ==", "type": "package", - "path": "system.reflection.emit/4.3.0", + "path": "system.reflection.emit/4.7.0", "files": [ ".nupkg.metadata", - "ThirdPartyNotices.txt", - "dotnet_library_license.txt", + ".signature.p7s", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", "lib/MonoAndroid10/_._", - "lib/monotouch10/_._", + "lib/MonoTouch10/_._", "lib/net45/_._", "lib/netcore50/System.Reflection.Emit.dll", + "lib/netcoreapp2.0/_._", + "lib/netstandard1.1/System.Reflection.Emit.dll", + "lib/netstandard1.1/System.Reflection.Emit.xml", "lib/netstandard1.3/System.Reflection.Emit.dll", + "lib/netstandard2.0/System.Reflection.Emit.dll", + "lib/netstandard2.0/System.Reflection.Emit.xml", + "lib/netstandard2.1/_._", "lib/xamarinios10/_._", "lib/xamarinmac20/_._", "lib/xamarintvos10/_._", "lib/xamarinwatchos10/_._", "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", "ref/net45/_._", + "ref/netcoreapp2.0/_._", "ref/netstandard1.1/System.Reflection.Emit.dll", "ref/netstandard1.1/System.Reflection.Emit.xml", "ref/netstandard1.1/de/System.Reflection.Emit.xml", @@ -3893,9 +3952,19 @@ "ref/netstandard1.1/ru/System.Reflection.Emit.xml", "ref/netstandard1.1/zh-hans/System.Reflection.Emit.xml", "ref/netstandard1.1/zh-hant/System.Reflection.Emit.xml", + "ref/netstandard2.0/System.Reflection.Emit.dll", + "ref/netstandard2.0/System.Reflection.Emit.xml", + "ref/netstandard2.1/_._", + "ref/xamarinios10/_._", "ref/xamarinmac20/_._", - "system.reflection.emit.4.3.0.nupkg.sha512", - "system.reflection.emit.nuspec" + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.Reflection.Emit.dll", + "runtimes/aot/lib/netcore50/System.Reflection.Emit.xml", + "system.reflection.emit.4.7.0.nupkg.sha512", + "system.reflection.emit.nuspec", + "useSharedDesignerContext.txt", + "version.txt" ] }, "System.Reflection.Emit.ILGeneration/4.3.0": { @@ -5738,6 +5807,8 @@ }, "projectFileDependencyGroups": { "net5.0": [ + "AutoMapper >= 10.1.1", + "AutoMapper.Extensions.Microsoft.DependencyInjection >= 8.1.1", "FootballManager.Data >= 1.0.0", "Microsoft.Extensions.DependencyInjection.Abstractions >= 6.0.0", "System.Configuration.ConfigurationManager >= 6.0.0" @@ -5790,6 +5861,14 @@ "net5.0": { "targetAlias": "net5.0", "dependencies": { + "AutoMapper": { + "target": "Package", + "version": "[10.1.1, )" + }, + "AutoMapper.Extensions.Microsoft.DependencyInjection": { + "target": "Package", + "version": "[8.1.1, )" + }, "Microsoft.Extensions.DependencyInjection.Abstractions": { "target": "Package", "version": "[6.0.0, )" diff --git a/Week7/FootballManager/FootballManager.Service/obj/project.nuget.cache b/Week7/FootballManager/FootballManager.Service/obj/project.nuget.cache index 80f7cee..c3b3309 100644 --- a/Week7/FootballManager/FootballManager.Service/obj/project.nuget.cache +++ b/Week7/FootballManager/FootballManager.Service/obj/project.nuget.cache @@ -1,10 +1,12 @@ { "version": 2, - "dgSpecHash": "p/zh6M0A5mAOTQp6eKcIW/CmR1DZaPrCQ0BjQkFxWbnl77kcMdBIyVpW+ARZ5cVm8nvORwOlw7jvp8nIQu1CbA==", + "dgSpecHash": "YWKRCIE32AMfyA6bKirMKuWVpTaTh0rAwZuRFnGOp6SmPIQ2x8+eIniKfvkxVhCHE1HLjBIkxIs3bxh5Vm/laA==", "success": true, "projectFilePath": "C:\\Users\\Allthebest\\Desktop\\InveonHomeworks\\Week7\\FootballManager\\FootballManager.Service\\FootballManager.Service.csproj", "expectedPackageFiles": [ - "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.csharp\\4.5.0\\microsoft.csharp.4.5.0.nupkg.sha512", + "C:\\Users\\Allthebest\\.nuget\\packages\\automapper\\10.1.1\\automapper.10.1.1.nupkg.sha512", + "C:\\Users\\Allthebest\\.nuget\\packages\\automapper.extensions.microsoft.dependencyinjection\\8.1.1\\automapper.extensions.microsoft.dependencyinjection.8.1.1.nupkg.sha512", + "C:\\Users\\Allthebest\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512", "C:\\Users\\Allthebest\\.nuget\\packages\\microsoft.data.sqlclient\\2.0.1\\microsoft.data.sqlclient.2.0.1.nupkg.sha512", "C:\\Users\\Allthebest\\.nuget\\packages\\microsoft.data.sqlclient.sni.runtime\\2.0.1\\microsoft.data.sqlclient.sni.runtime.2.0.1.nupkg.sha512", "C:\\Users\\Allthebest\\.nuget\\packages\\microsoft.entityframeworkcore\\5.0.12\\microsoft.entityframeworkcore.5.0.12.nupkg.sha512", @@ -64,7 +66,7 @@ "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.private.datacontractserialization\\4.3.0\\system.private.datacontractserialization.4.3.0.nupkg.sha512", "C:\\Users\\Allthebest\\.nuget\\packages\\system.private.uri\\4.3.2\\system.private.uri.4.3.2.nupkg.sha512", "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection\\4.3.0\\system.reflection.4.3.0.nupkg.sha512", - "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit\\4.3.0\\system.reflection.emit.4.3.0.nupkg.sha512", + "C:\\Users\\Allthebest\\.nuget\\packages\\system.reflection.emit\\4.7.0\\system.reflection.emit.4.7.0.nupkg.sha512", "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit.ilgeneration\\4.3.0\\system.reflection.emit.ilgeneration.4.3.0.nupkg.sha512", "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit.lightweight\\4.3.0\\system.reflection.emit.lightweight.4.3.0.nupkg.sha512", "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.extensions\\4.3.0\\system.reflection.extensions.4.3.0.nupkg.sha512",