Эх сурвалжийг харах

Добавьте файлы проекта.

Lena 5 сар өмнө
parent
commit
c33b5c15d1
62 өөрчлөгдсөн 6628 нэмэгдсэн , 0 устгасан
  1. 25 0
      NBAManagment.sln
  2. 43 0
      NBAManagment/App.config
  3. 9 0
      NBAManagment/App.xaml
  4. 18 0
      NBAManagment/App.xaml.cs
  5. 42 0
      NBAManagment/Entities/ActionType.cs
  6. 42 0
      NBAManagment/Entities/Conference.cs
  7. 44 0
      NBAManagment/Entities/Country.cs
  8. 33 0
      NBAManagment/Entities/Department.cs
  9. 46 0
      NBAManagment/Entities/Division.cs
  10. 48 0
      NBAManagment/Entities/Gender.cs
  11. 33 0
      NBAManagment/Entities/Image.cs
  12. 74 0
      NBAManagment/Entities/Matchup.cs
  13. 39 0
      NBAManagment/Entities/MatchupDetail.cs
  14. 51 0
      NBAManagment/Entities/MatchupLogs.cs
  15. 42 0
      NBAManagment/Entities/MatchupType.cs
  16. 88 0
      NBAManagment/Entities/NBAshka.Context.cs
  17. 636 0
      NBAManagment/Entities/NBAshka.Context.tt
  18. 10 0
      NBAManagment/Entities/NBAshka.Designer.cs
  19. 12 0
      NBAManagment/Entities/NBAshka.cs
  20. 1846 0
      NBAManagment/Entities/NBAshka.edmx
  21. 64 0
      NBAManagment/Entities/NBAshka.edmx.diagram
  22. 733 0
      NBAManagment/Entities/NBAshka.tt
  23. 48 0
      NBAManagment/Entities/Organization.cs
  24. 88 0
      NBAManagment/Entities/Player.cs
  25. 45 0
      NBAManagment/Entities/PlayerInTeam.cs
  26. 71 0
      NBAManagment/Entities/PlayerStatistic.cs
  27. 44 0
      NBAManagment/Entities/Position.cs
  28. 37 0
      NBAManagment/Entities/PostSeason.cs
  29. 48 0
      NBAManagment/Entities/Quarter.cs
  30. 42 0
      NBAManagment/Entities/Role.cs
  31. 54 0
      NBAManagment/Entities/Season.cs
  32. 42 0
      NBAManagment/Entities/Status.cs
  33. 42 0
      NBAManagment/Entities/StatusOrganization.cs
  34. 84 0
      NBAManagment/Entities/Team.cs
  35. 51 0
      NBAManagment/Entities/User.cs
  36. 33 0
      NBAManagment/Entities/sysdiagrams.cs
  37. 13 0
      NBAManagment/Filter/IFilter.cs
  38. 14 0
      NBAManagment/Filter/IFilteredEnumerable.cs
  39. 51 0
      NBAManagment/Filter/PageFilter.cs
  40. 77 0
      NBAManagment/Filter/PagedEnumerable.cs
  41. 82 0
      NBAManagment/MainWindow.xaml
  42. 35 0
      NBAManagment/MainWindow.xaml.cs
  43. 56 0
      NBAManagment/MatchPhotoLineManger.cs
  44. 50 0
      NBAManagment/Models/Image.cs
  45. 316 0
      NBAManagment/NBAManagment.csproj
  46. 64 0
      NBAManagment/PhotosPage.xaml
  47. 129 0
      NBAManagment/PhotosPage.xaml.cs
  48. 55 0
      NBAManagment/Properties/AssemblyInfo.cs
  49. 73 0
      NBAManagment/Properties/Resources.Designer.cs
  50. 124 0
      NBAManagment/Properties/Resources.resx
  51. 30 0
      NBAManagment/Properties/Settings.Designer.cs
  52. 7 0
      NBAManagment/Properties/Settings.settings
  53. BIN
      NBAManagment/Resources/download.png
  54. 241 0
      NBAManagment/TeamDetail.xaml
  55. 57 0
      NBAManagment/TeamDetail.xaml.cs
  56. 217 0
      NBAManagment/TeamsMain.xaml
  57. 41 0
      NBAManagment/TeamsMain.xaml.cs
  58. 26 0
      NBAManagment/TeamsViewModel.cs
  59. 96 0
      NBAManagment/VisitorMenu.xaml
  60. 51 0
      NBAManagment/VisitorMenu.xaml.cs
  61. BIN
      NBAManagment/logo.jpg
  62. 16 0
      NBAManagment/packages.config

+ 25 - 0
NBAManagment.sln

@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.3.32922.545
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NBAManagment", "NBAManagment\NBAManagment.csproj", "{FEAA1A00-A11C-4F81-819E-5A5B559733BD}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{FEAA1A00-A11C-4F81-819E-5A5B559733BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{FEAA1A00-A11C-4F81-819E-5A5B559733BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{FEAA1A00-A11C-4F81-819E-5A5B559733BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{FEAA1A00-A11C-4F81-819E-5A5B559733BD}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {31F3CC28-E60A-43C3-A549-F5B9726533CB}
+	EndGlobalSection
+EndGlobal

+ 43 - 0
NBAManagment/App.config

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <configSections>
+    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+  </configSections>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
+  </startup>
+  <connectionStrings>
+    <add name="PracticeNBAEntities" connectionString="metadata=res://*/Entities.NBAshka.csdl|res://*/Entities.NBAshka.ssdl|res://*/Entities.NBAshka.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=vpmt.ru\IS4;initial catalog=PracticeNBA;user id=user4;password=is4-user4;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
+  </connectionStrings>
+  <entityFramework>
+    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
+      <parameters>
+        <parameter value="mssqllocaldb" />
+      </parameters>
+    </defaultConnectionFactory>
+    <providers>
+      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
+    </providers>
+  </entityFramework>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
+</configuration>

+ 9 - 0
NBAManagment/App.xaml

@@ -0,0 +1,9 @@
+<Application x:Class="NBAManagment.App"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:local="clr-namespace:NBAManagment"
+             StartupUri="MainWindow.xaml">
+    <Application.Resources>
+         
+    </Application.Resources>
+</Application>

+ 18 - 0
NBAManagment/App.xaml.cs

@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace NBAManagment
+{
+    /// <summary>
+    /// Логика взаимодействия для App.xaml
+    /// </summary>
+    public partial class App : Application
+    {
+        
+    }
+}

+ 42 - 0
NBAManagment/Entities/ActionType.cs

@@ -0,0 +1,42 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class ActionType
+{
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public ActionType()
+    {
+
+        this.MatchupLogs = new HashSet<MatchupLogs>();
+
+    }
+
+
+    public int IdActionType { get; set; }
+
+    public string NameActionType { get; set; }
+
+
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<MatchupLogs> MatchupLogs { get; set; }
+
+}
+
+}

+ 42 - 0
NBAManagment/Entities/Conference.cs

@@ -0,0 +1,42 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class Conference
+{
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public Conference()
+    {
+
+        this.Division = new HashSet<Division>();
+
+    }
+
+
+    public int IdConference { get; set; }
+
+    public string NameConference { get; set; }
+
+
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<Division> Division { get; set; }
+
+}
+
+}

+ 44 - 0
NBAManagment/Entities/Country.cs

@@ -0,0 +1,44 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class Country
+{
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public Country()
+    {
+
+        this.Player = new HashSet<Player>();
+
+    }
+
+
+    public int IdCountry { get; set; }
+
+    public string NameCountry { get; set; }
+
+    public string CodeCountry { get; set; }
+
+
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<Player> Player { get; set; }
+
+}
+
+}

+ 33 - 0
NBAManagment/Entities/Department.cs

@@ -0,0 +1,33 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class Department
+{
+
+    public int IdDepartment { get; set; }
+
+    public string NameDepartment { get; set; }
+
+    public Nullable<int> IdOrganization { get; set; }
+
+
+
+    public virtual Organization Organization { get; set; }
+
+}
+
+}

+ 46 - 0
NBAManagment/Entities/Division.cs

@@ -0,0 +1,46 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class Division
+{
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public Division()
+    {
+
+        this.Team = new HashSet<Team>();
+
+    }
+
+
+    public int IdDivision { get; set; }
+
+    public string NameDivision { get; set; }
+
+    public Nullable<int> IdConference { get; set; }
+
+
+
+    public virtual Conference Conference { get; set; }
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<Team> Team { get; set; }
+
+}
+
+}

+ 48 - 0
NBAManagment/Entities/Gender.cs

@@ -0,0 +1,48 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class Gender
+{
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public Gender()
+    {
+
+        this.Player = new HashSet<Player>();
+
+        this.User = new HashSet<User>();
+
+    }
+
+
+    public int IdGender { get; set; }
+
+    public string NameGender { get; set; }
+
+
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<Player> Player { get; set; }
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<User> User { get; set; }
+
+}
+
+}

+ 33 - 0
NBAManagment/Entities/Image.cs

@@ -0,0 +1,33 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class Image
+{
+
+    public int IdImage { get; set; }
+
+    public byte[] Image1 { get; set; }
+
+    public string Description { get; set; }
+
+    public Nullable<int> NumberOfLikes { get; set; }
+
+    public Nullable<System.DateTime> CreateTime { get; set; }
+
+}
+
+}

+ 74 - 0
NBAManagment/Entities/Matchup.cs

@@ -0,0 +1,74 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class Matchup
+{
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public Matchup()
+    {
+
+        this.MatchupDetail = new HashSet<MatchupDetail>();
+
+        this.MatchupLogs = new HashSet<MatchupLogs>();
+
+    }
+
+
+    public int IdMatchup { get; set; }
+
+    public Nullable<int> IdSeason { get; set; }
+
+    public Nullable<int> IdMatchupType { get; set; }
+
+    public Nullable<int> IdTeamAway { get; set; }
+
+    public Nullable<int> IdTeamHome { get; set; }
+
+    public Nullable<System.DateTime> Starttime { get; set; }
+
+    public Nullable<int> TeamAwayScore { get; set; }
+
+    public Nullable<int> TeamHomeScore { get; set; }
+
+    public string Location { get; set; }
+
+    public Nullable<int> IdStatus { get; set; }
+
+
+
+    public virtual MatchupType MatchupType { get; set; }
+
+    public virtual Season Season { get; set; }
+
+    public virtual Status Status { get; set; }
+
+    public virtual Team Team { get; set; }
+
+    public virtual Team Team1 { get; set; }
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<MatchupDetail> MatchupDetail { get; set; }
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<MatchupLogs> MatchupLogs { get; set; }
+
+}
+
+}

+ 39 - 0
NBAManagment/Entities/MatchupDetail.cs

@@ -0,0 +1,39 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class MatchupDetail
+{
+
+    public int IdMatchupDetail { get; set; }
+
+    public Nullable<int> IdMatchup { get; set; }
+
+    public Nullable<int> IdQuarter { get; set; }
+
+    public Nullable<int> TeamAwayScore { get; set; }
+
+    public Nullable<int> TeamHomeScore { get; set; }
+
+
+
+    public virtual Matchup Matchup { get; set; }
+
+    public virtual Quarter Quarter { get; set; }
+
+}
+
+}

+ 51 - 0
NBAManagment/Entities/MatchupLogs.cs

@@ -0,0 +1,51 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class MatchupLogs
+{
+
+    public int IdMatchupLogs { get; set; }
+
+    public Nullable<int> IdMatchup { get; set; }
+
+    public Nullable<int> IdQuarter { get; set; }
+
+    public string OccurTime { get; set; }
+
+    public Nullable<int> IdTeam { get; set; }
+
+    public Nullable<int> IdPlayer { get; set; }
+
+    public Nullable<int> IdActionType { get; set; }
+
+    public string Remark { get; set; }
+
+
+
+    public virtual ActionType ActionType { get; set; }
+
+    public virtual Matchup Matchup { get; set; }
+
+    public virtual Player Player { get; set; }
+
+    public virtual Quarter Quarter { get; set; }
+
+    public virtual Team Team { get; set; }
+
+}
+
+}

+ 42 - 0
NBAManagment/Entities/MatchupType.cs

@@ -0,0 +1,42 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class MatchupType
+{
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public MatchupType()
+    {
+
+        this.Matchup = new HashSet<Matchup>();
+
+    }
+
+
+    public int IdMatchupType { get; set; }
+
+    public string NameMatchupType { get; set; }
+
+
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<Matchup> Matchup { get; set; }
+
+}
+
+}

+ 88 - 0
NBAManagment/Entities/NBAshka.Context.cs

@@ -0,0 +1,88 @@
+
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+using System.Data.Entity;
+using System.Data.Entity.Infrastructure;
+
+
+public partial class PracticeNBAEntities : DbContext
+{
+    public PracticeNBAEntities()
+        : base("name=PracticeNBAEntities")
+    {
+
+    }
+
+    protected override void OnModelCreating(DbModelBuilder modelBuilder)
+    {
+        throw new UnintentionalCodeFirstException();
+    }
+
+
+    public virtual DbSet<ActionType> ActionType { get; set; }
+
+    public virtual DbSet<Conference> Conference { get; set; }
+
+    public virtual DbSet<Country> Country { get; set; }
+
+    public virtual DbSet<Department> Department { get; set; }
+
+    public virtual DbSet<Division> Division { get; set; }
+
+    public virtual DbSet<Gender> Gender { get; set; }
+
+    public virtual DbSet<Image> Image { get; set; }
+
+    public virtual DbSet<Matchup> Matchup { get; set; }
+
+    public virtual DbSet<MatchupDetail> MatchupDetail { get; set; }
+
+    public virtual DbSet<MatchupLogs> MatchupLogs { get; set; }
+
+    public virtual DbSet<MatchupType> MatchupType { get; set; }
+
+    public virtual DbSet<Organization> Organization { get; set; }
+
+    public virtual DbSet<Player> Player { get; set; }
+
+    public virtual DbSet<PlayerInTeam> PlayerInTeam { get; set; }
+
+    public virtual DbSet<PlayerStatistic> PlayerStatistic { get; set; }
+
+    public virtual DbSet<Position> Position { get; set; }
+
+    public virtual DbSet<PostSeason> PostSeason { get; set; }
+
+    public virtual DbSet<Quarter> Quarter { get; set; }
+
+    public virtual DbSet<Role> Role { get; set; }
+
+    public virtual DbSet<Season> Season { get; set; }
+
+    public virtual DbSet<Status> Status { get; set; }
+
+    public virtual DbSet<StatusOrganization> StatusOrganization { get; set; }
+
+    public virtual DbSet<sysdiagrams> sysdiagrams { get; set; }
+
+    public virtual DbSet<Team> Team { get; set; }
+
+    public virtual DbSet<User> User { get; set; }
+
+}
+
+}
+

+ 636 - 0
NBAManagment/Entities/NBAshka.Context.tt

@@ -0,0 +1,636 @@
+<#@ template language="C#" debug="false" hostspecific="true"#>
+<#@ include file="EF6.Utility.CS.ttinclude"#><#@
+ output extension=".cs"#><#
+
+const string inputFile = @"NBAshka.edmx";
+var textTransform = DynamicTextTransformation.Create(this);
+var code = new CodeGenerationTools(this);
+var ef = new MetadataTools(this);
+var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
+var loader = new EdmMetadataLoader(textTransform.Host, textTransform.Errors);
+var itemCollection = loader.CreateEdmItemCollection(inputFile);
+var modelNamespace = loader.GetModelNamespace(inputFile);
+var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
+
+var container = itemCollection.OfType<EntityContainer>().FirstOrDefault();
+if (container == null)
+{
+    return string.Empty;
+}
+#>
+//------------------------------------------------------------------------------
+// <auto-generated>
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
+//
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+<#
+
+var codeNamespace = code.VsNamespaceSuggestion();
+if (!String.IsNullOrEmpty(codeNamespace))
+{
+#>
+namespace <#=code.EscapeNamespace(codeNamespace)#>
+{
+<#
+    PushIndent("    ");
+}
+
+#>
+using System;
+using System.Data.Entity;
+using System.Data.Entity.Infrastructure;
+<#
+if (container.FunctionImports.Any())
+{
+#>
+using System.Data.Entity.Core.Objects;
+using System.Linq;
+<#
+}
+#>
+
+<#=Accessibility.ForType(container)#> partial class <#=code.Escape(container)#> : DbContext
+{
+    public <#=code.Escape(container)#>()
+        : base("name=<#=container.Name#>")
+    {
+<#
+if (!loader.IsLazyLoadingEnabled(container))
+{
+#>
+        this.Configuration.LazyLoadingEnabled = false;
+<#
+}
+
+foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
+{
+    // Note: the DbSet members are defined below such that the getter and
+    // setter always have the same accessibility as the DbSet definition
+    if (Accessibility.ForReadOnlyProperty(entitySet) != "public")
+    {
+#>
+        <#=codeStringGenerator.DbSetInitializer(entitySet)#>
+<#
+    }
+}
+#>
+    }
+
+    protected override void OnModelCreating(DbModelBuilder modelBuilder)
+    {
+        throw new UnintentionalCodeFirstException();
+    }
+
+<#
+    foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
+    {
+#>
+    <#=codeStringGenerator.DbSet(entitySet)#>
+<#
+    }
+
+    foreach (var edmFunction in container.FunctionImports)
+    {
+        WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: false);
+    }
+#>
+}
+<#
+
+if (!String.IsNullOrEmpty(codeNamespace))
+{
+    PopIndent();
+#>
+}
+<#
+}
+#>
+<#+
+
+private void WriteFunctionImport(TypeMapper typeMapper, CodeStringGenerator codeStringGenerator, EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+{
+    if (typeMapper.IsComposable(edmFunction))
+    {
+#>
+
+    [DbFunction("<#=edmFunction.NamespaceName#>", "<#=edmFunction.Name#>")]
+    <#=codeStringGenerator.ComposableFunctionMethod(edmFunction, modelNamespace)#>
+    {
+<#+
+        codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
+#>
+        <#=codeStringGenerator.ComposableCreateQuery(edmFunction, modelNamespace)#>
+    }
+<#+
+    }
+    else
+    {
+#>
+
+    <#=codeStringGenerator.FunctionMethod(edmFunction, modelNamespace, includeMergeOption)#>
+    {
+<#+
+        codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
+#>
+        <#=codeStringGenerator.ExecuteFunction(edmFunction, modelNamespace, includeMergeOption)#>
+    }
+<#+
+        if (typeMapper.GenerateMergeOptionFunction(edmFunction, includeMergeOption))
+        {
+            WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: true);
+        }
+    }
+}
+
+public void WriteFunctionParameter(string name, string isNotNull, string notNullInit, string nullInit)
+{
+#>
+        var <#=name#> = <#=isNotNull#> ?
+            <#=notNullInit#> :
+            <#=nullInit#>;
+
+<#+
+}
+
+public const string TemplateId = "CSharp_DbContext_Context_EF6";
+
+public class CodeStringGenerator
+{
+    private readonly CodeGenerationTools _code;
+    private readonly TypeMapper _typeMapper;
+    private readonly MetadataTools _ef;
+
+    public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
+    {
+        ArgumentNotNull(code, "code");
+        ArgumentNotNull(typeMapper, "typeMapper");
+        ArgumentNotNull(ef, "ef");
+
+        _code = code;
+        _typeMapper = typeMapper;
+        _ef = ef;
+    }
+
+    public string Property(EdmProperty edmProperty)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} {1} {2} {{ {3}get; {4}set; }}",
+            Accessibility.ForProperty(edmProperty),
+            _typeMapper.GetTypeName(edmProperty.TypeUsage),
+            _code.Escape(edmProperty),
+            _code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
+            _code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
+    }
+
+    public string NavigationProperty(NavigationProperty navProp)
+    {
+        var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} {1} {2} {{ {3}get; {4}set; }}",
+            AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
+            navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
+            _code.Escape(navProp),
+            _code.SpaceAfter(Accessibility.ForGetter(navProp)),
+            _code.SpaceAfter(Accessibility.ForSetter(navProp)));
+    }
+    
+    public string AccessibilityAndVirtual(string accessibility)
+    {
+        return accessibility + (accessibility != "private" ? " virtual" : "");
+    }
+    
+    public string EntityClassOpening(EntityType entity)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} {1}partial class {2}{3}",
+            Accessibility.ForType(entity),
+            _code.SpaceAfter(_code.AbstractOption(entity)),
+            _code.Escape(entity),
+            _code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
+    }
+    
+    public string EnumOpening(SimpleType enumType)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} enum {1} : {2}",
+            Accessibility.ForType(enumType),
+            _code.Escape(enumType),
+            _code.Escape(_typeMapper.UnderlyingClrType(enumType)));
+        }
+    
+    public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
+    {
+        var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
+        foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
+        {
+            var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
+            var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
+            var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
+            writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
+        }
+    }
+    
+    public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
+    {
+        var parameters = _typeMapper.GetParameters(edmFunction);
+        
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} IQueryable<{1}> {2}({3})",
+            AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
+            _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
+            _code.Escape(edmFunction),
+            string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
+    }
+    
+    public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
+    {
+        var parameters = _typeMapper.GetParameters(edmFunction);
+        
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
+            _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
+            edmFunction.NamespaceName,
+            edmFunction.Name,
+            string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
+            _code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
+    }
+    
+    public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+    {
+        var parameters = _typeMapper.GetParameters(edmFunction);
+        var returnType = _typeMapper.GetReturnType(edmFunction);
+
+        var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
+        if (includeMergeOption)
+        {
+            paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
+        }
+
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} {1} {2}({3})",
+            AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
+            returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
+            _code.Escape(edmFunction),
+            paramList);
+    }
+    
+    public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+    {
+        var parameters = _typeMapper.GetParameters(edmFunction);
+        var returnType = _typeMapper.GetReturnType(edmFunction);
+
+        var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
+        if (includeMergeOption)
+        {
+            callParams = ", mergeOption" + callParams;
+        }
+        
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
+            returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
+            edmFunction.Name,
+            callParams);
+    }
+    
+    public string DbSet(EntitySet entitySet)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} virtual DbSet<{1}> {2} {{ get; set; }}",
+            Accessibility.ForReadOnlyProperty(entitySet),
+            _typeMapper.GetTypeName(entitySet.ElementType),
+            _code.Escape(entitySet));
+    }
+
+    public string DbSetInitializer(EntitySet entitySet)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} = Set<{1}>();",
+            _code.Escape(entitySet),
+            _typeMapper.GetTypeName(entitySet.ElementType));
+    }
+
+    public string UsingDirectives(bool inHeader, bool includeCollections = true)
+    {
+        return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
+            ? string.Format(
+                CultureInfo.InvariantCulture,
+                "{0}using System;{1}" +
+                "{2}",
+                inHeader ? Environment.NewLine : "",
+                includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
+                inHeader ? "" : Environment.NewLine)
+            : "";
+    }
+}
+
+public class TypeMapper
+{
+    private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
+
+    private readonly System.Collections.IList _errors;
+    private readonly CodeGenerationTools _code;
+    private readonly MetadataTools _ef;
+
+    public static string FixNamespaces(string typeName)
+    {
+        return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
+    }
+
+    public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
+    {
+        ArgumentNotNull(code, "code");
+        ArgumentNotNull(ef, "ef");
+        ArgumentNotNull(errors, "errors");
+
+        _code = code;
+        _ef = ef;
+        _errors = errors;
+    }
+
+    public string GetTypeName(TypeUsage typeUsage)
+    {
+        return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
+    }
+
+    public string GetTypeName(EdmType edmType)
+    {
+        return GetTypeName(edmType, isNullable: null, modelNamespace: null);
+    }
+
+    public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
+    {
+        return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
+    }
+
+    public string GetTypeName(EdmType edmType, string modelNamespace)
+    {
+        return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
+    }
+
+    public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
+    {
+        if (edmType == null)
+        {
+            return null;
+        }
+
+        var collectionType = edmType as CollectionType;
+        if (collectionType != null)
+        {
+            return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
+        }
+
+        var typeName = _code.Escape(edmType.MetadataProperties
+                                .Where(p => p.Name == ExternalTypeNameAttributeName)
+                                .Select(p => (string)p.Value)
+                                .FirstOrDefault())
+            ?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
+                _code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
+                _code.Escape(edmType));
+
+        if (edmType is StructuralType)
+        {
+            return typeName;
+        }
+
+        if (edmType is SimpleType)
+        {
+            var clrType = UnderlyingClrType(edmType);
+            if (!IsEnumType(edmType))
+            {
+                typeName = _code.Escape(clrType);
+            }
+
+            typeName = FixNamespaces(typeName);
+
+            return clrType.IsValueType && isNullable == true ?
+                String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
+                typeName;
+        }
+
+        throw new ArgumentException("edmType");
+    }
+    
+    public Type UnderlyingClrType(EdmType edmType)
+    {
+        ArgumentNotNull(edmType, "edmType");
+
+        var primitiveType = edmType as PrimitiveType;
+        if (primitiveType != null)
+        {
+            return primitiveType.ClrEquivalentType;
+        }
+
+        if (IsEnumType(edmType))
+        {
+            return GetEnumUnderlyingType(edmType).ClrEquivalentType;
+        }
+
+        return typeof(object);
+    }
+    
+    public object GetEnumMemberValue(MetadataItem enumMember)
+    {
+        ArgumentNotNull(enumMember, "enumMember");
+        
+        var valueProperty = enumMember.GetType().GetProperty("Value");
+        return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
+    }
+    
+    public string GetEnumMemberName(MetadataItem enumMember)
+    {
+        ArgumentNotNull(enumMember, "enumMember");
+        
+        var nameProperty = enumMember.GetType().GetProperty("Name");
+        return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
+    }
+
+    public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
+    {
+        ArgumentNotNull(enumType, "enumType");
+
+        var membersProperty = enumType.GetType().GetProperty("Members");
+        return membersProperty != null 
+            ? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
+            : Enumerable.Empty<MetadataItem>();
+    }
+    
+    public bool EnumIsFlags(EdmType enumType)
+    {
+        ArgumentNotNull(enumType, "enumType");
+        
+        var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
+        return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
+    }
+
+    public bool IsEnumType(GlobalItem edmType)
+    {
+        ArgumentNotNull(edmType, "edmType");
+
+        return edmType.GetType().Name == "EnumType";
+    }
+
+    public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
+    {
+        ArgumentNotNull(enumType, "enumType");
+
+        return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
+    }
+
+    public string CreateLiteral(object value)
+    {
+        if (value == null || value.GetType() != typeof(TimeSpan))
+        {
+            return _code.CreateLiteral(value);
+        }
+
+        return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
+    }
+    
+    public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
+    {
+        ArgumentNotNull(types, "types");
+        ArgumentNotNull(sourceFile, "sourceFile");
+        
+        var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
+        if (types.Any(item => !hash.Add(item)))
+        {
+            _errors.Add(
+                new CompilerError(sourceFile, -1, -1, "6023",
+                    String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
+            return false;
+        }
+        return true;
+    }
+    
+    public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
+    {
+        return GetItemsToGenerate<SimpleType>(itemCollection)
+            .Where(e => IsEnumType(e));
+    }
+    
+    public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
+    {
+        return itemCollection
+            .OfType<T>()
+            .Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
+            .OrderBy(i => i.Name);
+    }
+
+    public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
+    {
+        return itemCollection
+            .Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
+            .Select(g => GetGlobalItemName(g));
+    }
+
+    public string GetGlobalItemName(GlobalItem item)
+    {
+        if (item is EdmType)
+        {
+            return ((EdmType)item).Name;
+        }
+        else
+        {
+            return ((EntityContainer)item).Name;
+        }
+    }
+
+    public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
+    }
+    
+    public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
+    }
+    
+    public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
+    }
+    
+    public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
+    }
+
+    public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
+    }
+    
+    public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
+    }
+
+    public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
+    {
+        return type.NavigationProperties.Where(np => np.DeclaringType == type);
+    }
+    
+    public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
+    {
+        return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
+    }
+    
+    public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
+    {
+        ArgumentNotNull(edmFunction, "edmFunction");
+
+        var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
+        return returnParamsProperty == null
+            ? edmFunction.ReturnParameter
+            : ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
+    }
+
+    public bool IsComposable(EdmFunction edmFunction)
+    {
+        ArgumentNotNull(edmFunction, "edmFunction");
+
+        var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
+        return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
+    }
+
+    public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
+    {
+        return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
+    }
+
+    public TypeUsage GetReturnType(EdmFunction edmFunction)
+    {
+        var returnParam = GetReturnParameter(edmFunction);
+        return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
+    }
+    
+    public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
+    {
+        var returnType = GetReturnType(edmFunction);
+        return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
+    }
+}
+
+public static void ArgumentNotNull<T>(T arg, string name) where T : class
+{
+    if (arg == null)
+    {
+        throw new ArgumentNullException(name);
+    }
+}
+#>

+ 10 - 0
NBAManagment/Entities/NBAshka.Designer.cs

@@ -0,0 +1,10 @@
+// Создание кода T4 для модели "C:\Users\User\Desktop\ааа\YP07.NBATeam-master — копия — копия\NBAManagment\NBAManagment\Entities\NBAshka.edmx" включено. 
+// Чтобы включить формирование кода прежних версий, измените значение свойства "Стратегия создания кода" конструктора
+// на "Legacy ObjectContext". Это свойство доступно в окне "Свойства", если модель
+// открыта в конструкторе.
+
+// Если не сформированы контекст и классы сущности, возможная причина в том, что вы создали пустую модель, но
+// еще не выбрали версию Entity Framework для использования. Чтобы сформировать класс контекста и классы сущностей
+// для своей модели, откройте модель в конструкторе, щелкните правой кнопкой область конструктора и
+// выберите "Обновить модель из базы данных", "Сформировать базу данных из модели" или "Добавить элемент формирования
+// кода...".

+ 12 - 0
NBAManagment/Entities/NBAshka.cs

@@ -0,0 +1,12 @@
+
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+

+ 1846 - 0
NBAManagment/Entities/NBAshka.edmx

@@ -0,0 +1,1846 @@
+<?xml version="1.0" encoding="utf-8"?>
+<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
+  <!-- EF Runtime content -->
+  <edmx:Runtime>
+    <!-- SSDL content -->
+    <edmx:StorageModels>
+    <Schema Namespace="Хранилище PracticeNBAModel" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
+        <EntityType Name="ActionType">
+          <Key>
+            <PropertyRef Name="IdActionType" />
+          </Key>
+          <Property Name="IdActionType" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="NameActionType" Type="varchar" MaxLength="50" />
+        </EntityType>
+        <EntityType Name="Conference">
+          <Key>
+            <PropertyRef Name="IdConference" />
+          </Key>
+          <Property Name="IdConference" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="NameConference" Type="varchar" MaxLength="50" />
+        </EntityType>
+        <EntityType Name="Country">
+          <Key>
+            <PropertyRef Name="IdCountry" />
+          </Key>
+          <Property Name="IdCountry" Type="int" Nullable="false" />
+          <Property Name="NameCountry" Type="varchar" MaxLength="50" />
+          <Property Name="CodeCountry" Type="char" MaxLength="3" />
+        </EntityType>
+        <EntityType Name="Department">
+          <Key>
+            <PropertyRef Name="IdDepartment" />
+          </Key>
+          <Property Name="IdDepartment" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="NameDepartment" Type="varchar" MaxLength="50" />
+          <Property Name="IdOrganization" Type="int" />
+        </EntityType>
+        <EntityType Name="Division">
+          <Key>
+            <PropertyRef Name="IdDivision" />
+          </Key>
+          <Property Name="IdDivision" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="NameDivision" Type="varchar" MaxLength="50" />
+          <Property Name="IdConference" Type="int" />
+        </EntityType>
+        <EntityType Name="Gender">
+          <Key>
+            <PropertyRef Name="IdGender" />
+          </Key>
+          <Property Name="IdGender" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="NameGender" Type="varchar" MaxLength="50" />
+        </EntityType>
+        <EntityType Name="Image">
+          <Key>
+            <PropertyRef Name="IdImage" />
+          </Key>
+          <Property Name="IdImage" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="Image" Type="varbinary(max)" Nullable="false" />
+          <Property Name="Description" Type="varchar" MaxLength="50" />
+          <Property Name="NumberOfLikes" Type="int" />
+          <Property Name="CreateTime" Type="datetime" />
+        </EntityType>
+        <EntityType Name="Matchup">
+          <Key>
+            <PropertyRef Name="IdMatchup" />
+          </Key>
+          <Property Name="IdMatchup" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="IdSeason" Type="int" />
+          <Property Name="IdMatchupType" Type="int" />
+          <Property Name="IdTeamAway" Type="int" />
+          <Property Name="IdTeamHome" Type="int" />
+          <Property Name="Starttime" Type="datetime" />
+          <Property Name="TeamAwayScore" Type="int" />
+          <Property Name="TeamHomeScore" Type="int" />
+          <Property Name="Location" Type="varchar" MaxLength="200" />
+          <Property Name="IdStatus" Type="int" />
+        </EntityType>
+        <EntityType Name="MatchupDetail">
+          <Key>
+            <PropertyRef Name="IdMatchupDetail" />
+          </Key>
+          <Property Name="IdMatchupDetail" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="IdMatchup" Type="int" />
+          <Property Name="IdQuarter" Type="int" />
+          <Property Name="TeamAwayScore" Type="int" />
+          <Property Name="TeamHomeScore" Type="int" />
+        </EntityType>
+        <EntityType Name="MatchupLogs">
+          <Key>
+            <PropertyRef Name="IdMatchupLogs" />
+          </Key>
+          <Property Name="IdMatchupLogs" Type="int" Nullable="false" />
+          <Property Name="IdMatchup" Type="int" />
+          <Property Name="IdQuarter" Type="int" />
+          <Property Name="OccurTime" Type="varchar" MaxLength="10" />
+          <Property Name="IdTeam" Type="int" />
+          <Property Name="IdPlayer" Type="int" />
+          <Property Name="IdActionType" Type="int" />
+          <Property Name="Remark" Type="varchar" MaxLength="300" />
+        </EntityType>
+        <EntityType Name="MatchupType">
+          <Key>
+            <PropertyRef Name="IdMatchupType" />
+          </Key>
+          <Property Name="IdMatchupType" Type="int" Nullable="false" />
+          <Property Name="NameMatchupType" Type="varchar" MaxLength="50" />
+        </EntityType>
+        <EntityType Name="Organization">
+          <Key>
+            <PropertyRef Name="IdOrganization" />
+          </Key>
+          <Property Name="IdOrganization" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="OrganizationName" Type="varchar" MaxLength="50" />
+          <Property Name="Info" Type="text" />
+          <Property Name="IdStatusOrganization" Type="int" />
+        </EntityType>
+        <EntityType Name="Player">
+          <Key>
+            <PropertyRef Name="IdPlayer" />
+          </Key>
+          <Property Name="IdPlayer" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="Surename" Type="varchar" MaxLength="50" />
+          <Property Name="Name" Type="varchar" MaxLength="50" />
+          <Property Name="Patronymic" Type="varchar" MaxLength="50" />
+          <Property Name="IdPosition" Type="int" />
+          <Property Name="JoinYear" Type="date" />
+          <Property Name="IdGender" Type="int" />
+          <Property Name="Height" Type="decimal" Precision="10" Scale="2" />
+          <Property Name="Weight" Type="decimal" Precision="10" Scale="2" />
+          <Property Name="DateOfBirth" Type="date" />
+          <Property Name="College" Type="varchar" MaxLength="50" />
+          <Property Name="Email" Type="varchar" MaxLength="50" />
+          <Property Name="IdCountry" Type="int" />
+          <Property Name="IsRetiment" Type="bit" />
+          <Property Name="RetirmentTime" Type="date" />
+          <Property Name="Image" Type="image" />
+        </EntityType>
+        <EntityType Name="PlayerInTeam">
+          <Key>
+            <PropertyRef Name="IdPlayerInTeam" />
+          </Key>
+          <Property Name="IdPlayerInTeam" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="IdPlayer" Type="int" />
+          <Property Name="IdTeam" Type="int" />
+          <Property Name="IdSeason" Type="int" />
+          <Property Name="ShirtNumber" Type="varchar" MaxLength="10" />
+          <Property Name="Salary" Type="decimal" Precision="10" Scale="2" />
+          <Property Name="StarterIndex" Type="int" />
+        </EntityType>
+        <EntityType Name="PlayerStatistic">
+          <Key>
+            <PropertyRef Name="IdPlayerStatistic" />
+          </Key>
+          <Property Name="IdPlayerStatistic" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="IdMatchup" Type="int" />
+          <Property Name="IdTeam" Type="int" />
+          <Property Name="IdPlayer" Type="int" />
+          <Property Name="IsStarting" Type="int" />
+          <Property Name="Min" Type="decimal" Precision="10" Scale="2" />
+          <Property Name="Point" Type="int" />
+          <Property Name="Assist" Type="int" />
+          <Property Name="FieldGoalMade" Type="int" />
+          <Property Name="FieldGoalMissed" Type="int" />
+          <Property Name="ThreePointFieldGoalMade" Type="int" />
+          <Property Name="ThreePointFieldGoalMissed" Type="int" />
+          <Property Name="FreeThrowMade" Type="int" />
+          <Property Name="FreeThrowMissed" Type="int" />
+          <Property Name="Rebound" Type="int" />
+          <Property Name="OFFR" Type="int" />
+          <Property Name="DFFR" Type="int" />
+          <Property Name="Steal" Type="int" />
+          <Property Name="Block" Type="int" />
+          <Property Name="Turnover" Type="int" />
+          <Property Name="Foul" Type="int" />
+        </EntityType>
+        <EntityType Name="Position">
+          <Key>
+            <PropertyRef Name="IdPosition" />
+          </Key>
+          <Property Name="IdPosition" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="NamePosition" Type="varchar" MaxLength="50" />
+          <Property Name="Abbr" Type="char" MaxLength="3" />
+        </EntityType>
+        <EntityType Name="PostSeason">
+          <Key>
+            <PropertyRef Name="IdPostSeason" />
+          </Key>
+          <Property Name="IdPostSeason" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="IdSeason" Type="int" />
+          <Property Name="IdTeam" Type="int" />
+          <Property Name="Rank" Type="int" />
+        </EntityType>
+        <EntityType Name="Quarter">
+          <Key>
+            <PropertyRef Name="IdQuarter" />
+          </Key>
+          <Property Name="IdQuarter" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="NameQuarter" Type="varchar" MaxLength="50" />
+        </EntityType>
+        <EntityType Name="Role">
+          <Key>
+            <PropertyRef Name="IdRole" />
+          </Key>
+          <Property Name="IdRole" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="RoleName" Type="varchar" MaxLength="50" />
+        </EntityType>
+        <EntityType Name="Season">
+          <Key>
+            <PropertyRef Name="IdSeason" />
+          </Key>
+          <Property Name="IdSeason" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="NameSeason" Type="varchar" MaxLength="50" />
+        </EntityType>
+        <EntityType Name="Status">
+          <Key>
+            <PropertyRef Name="IdStatus" />
+          </Key>
+          <Property Name="IdStatus" Type="int" Nullable="false" />
+          <Property Name="NameStatus" Type="varchar" MaxLength="50" />
+        </EntityType>
+        <EntityType Name="StatusOrganization">
+          <Key>
+            <PropertyRef Name="IdStatusOrganization" />
+          </Key>
+          <Property Name="IdStatusOrganization" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="NameStatusOrganization" Type="varchar" MaxLength="50" />
+        </EntityType>
+        <EntityType Name="sysdiagrams">
+          <Key>
+            <PropertyRef Name="diagram_id" />
+          </Key>
+          <Property Name="name" Type="nvarchar" MaxLength="128" Nullable="false" />
+          <Property Name="principal_id" Type="int" Nullable="false" />
+          <Property Name="diagram_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="version" Type="int" />
+          <Property Name="definition" Type="varbinary(max)" />
+        </EntityType>
+        <EntityType Name="Team">
+          <Key>
+            <PropertyRef Name="IdTeam" />
+          </Key>
+          <Property Name="IdTeam" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="TeamName" Type="varchar" MaxLength="50" />
+          <Property Name="IdDivision" Type="int" />
+          <Property Name="Couch" Type="varchar" MaxLength="50" />
+          <Property Name="Abbr" Type="char" MaxLength="3" />
+          <Property Name="Stadium" Type="varchar" MaxLength="100" />
+          <Property Name="Logo" Type="image" />
+        </EntityType>
+        <EntityType Name="User">
+          <Key>
+            <PropertyRef Name="IdUser" />
+          </Key>
+          <Property Name="IdUser" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="Surename" Type="varchar" MaxLength="50" />
+          <Property Name="Name" Type="varchar" MaxLength="50" />
+          <Property Name="Patronymic" Type="varchar" MaxLength="50" />
+          <Property Name="LoginName" Type="varchar" MaxLength="100" />
+          <Property Name="Password" Type="varchar" MaxLength="50" />
+          <Property Name="IdGender" Type="int" />
+          <Property Name="DateOfBirth" Type="date" />
+          <Property Name="Phone" Type="varchar" MaxLength="20" />
+          <Property Name="Email" Type="varchar" MaxLength="50" />
+          <Property Name="IdRole" Type="int" />
+        </EntityType>
+        <Association Name="FK_Department_Organization">
+          <End Role="Organization" Type="Self.Organization" Multiplicity="0..1" />
+          <End Role="Department" Type="Self.Department" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Organization">
+              <PropertyRef Name="IdOrganization" />
+            </Principal>
+            <Dependent Role="Department">
+              <PropertyRef Name="IdOrganization" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Division_Conference">
+          <End Role="Conference" Type="Self.Conference" Multiplicity="0..1" />
+          <End Role="Division" Type="Self.Division" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Conference">
+              <PropertyRef Name="IdConference" />
+            </Principal>
+            <Dependent Role="Division">
+              <PropertyRef Name="IdConference" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Matchup_MatchupType">
+          <End Role="MatchupType" Type="Self.MatchupType" Multiplicity="0..1" />
+          <End Role="Matchup" Type="Self.Matchup" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="MatchupType">
+              <PropertyRef Name="IdMatchupType" />
+            </Principal>
+            <Dependent Role="Matchup">
+              <PropertyRef Name="IdMatchupType" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Matchup_Season">
+          <End Role="Season" Type="Self.Season" Multiplicity="0..1" />
+          <End Role="Matchup" Type="Self.Matchup" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Season">
+              <PropertyRef Name="IdSeason" />
+            </Principal>
+            <Dependent Role="Matchup">
+              <PropertyRef Name="IdSeason" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Matchup_Status">
+          <End Role="Status" Type="Self.Status" Multiplicity="0..1" />
+          <End Role="Matchup" Type="Self.Matchup" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Status">
+              <PropertyRef Name="IdStatus" />
+            </Principal>
+            <Dependent Role="Matchup">
+              <PropertyRef Name="IdStatus" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Matchup_Team">
+          <End Role="Team" Type="Self.Team" Multiplicity="0..1" />
+          <End Role="Matchup" Type="Self.Matchup" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Team">
+              <PropertyRef Name="IdTeam" />
+            </Principal>
+            <Dependent Role="Matchup">
+              <PropertyRef Name="IdTeamAway" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Matchup_Team1">
+          <End Role="Team" Type="Self.Team" Multiplicity="0..1" />
+          <End Role="Matchup" Type="Self.Matchup" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Team">
+              <PropertyRef Name="IdTeam" />
+            </Principal>
+            <Dependent Role="Matchup">
+              <PropertyRef Name="IdTeamHome" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_MatchupDetail_Matchup">
+          <End Role="Matchup" Type="Self.Matchup" Multiplicity="0..1" />
+          <End Role="MatchupDetail" Type="Self.MatchupDetail" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Matchup">
+              <PropertyRef Name="IdMatchup" />
+            </Principal>
+            <Dependent Role="MatchupDetail">
+              <PropertyRef Name="IdMatchup" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_MatchupDetail_Quarter">
+          <End Role="Quarter" Type="Self.Quarter" Multiplicity="0..1" />
+          <End Role="MatchupDetail" Type="Self.MatchupDetail" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Quarter">
+              <PropertyRef Name="IdQuarter" />
+            </Principal>
+            <Dependent Role="MatchupDetail">
+              <PropertyRef Name="IdQuarter" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_MatchupLogs_ActionType">
+          <End Role="ActionType" Type="Self.ActionType" Multiplicity="0..1" />
+          <End Role="MatchupLogs" Type="Self.MatchupLogs" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="ActionType">
+              <PropertyRef Name="IdActionType" />
+            </Principal>
+            <Dependent Role="MatchupLogs">
+              <PropertyRef Name="IdActionType" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_MatchupLogs_Matchup">
+          <End Role="Matchup" Type="Self.Matchup" Multiplicity="0..1" />
+          <End Role="MatchupLogs" Type="Self.MatchupLogs" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Matchup">
+              <PropertyRef Name="IdMatchup" />
+            </Principal>
+            <Dependent Role="MatchupLogs">
+              <PropertyRef Name="IdMatchup" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_MatchupLogs_Player">
+          <End Role="Player" Type="Self.Player" Multiplicity="0..1" />
+          <End Role="MatchupLogs" Type="Self.MatchupLogs" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Player">
+              <PropertyRef Name="IdPlayer" />
+            </Principal>
+            <Dependent Role="MatchupLogs">
+              <PropertyRef Name="IdPlayer" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_MatchupLogs_Quarter">
+          <End Role="Quarter" Type="Self.Quarter" Multiplicity="0..1" />
+          <End Role="MatchupLogs" Type="Self.MatchupLogs" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Quarter">
+              <PropertyRef Name="IdQuarter" />
+            </Principal>
+            <Dependent Role="MatchupLogs">
+              <PropertyRef Name="IdQuarter" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_MatchupLogs_Team">
+          <End Role="Team" Type="Self.Team" Multiplicity="0..1" />
+          <End Role="MatchupLogs" Type="Self.MatchupLogs" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Team">
+              <PropertyRef Name="IdTeam" />
+            </Principal>
+            <Dependent Role="MatchupLogs">
+              <PropertyRef Name="IdTeam" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Organization_StatusOrganization">
+          <End Role="StatusOrganization" Type="Self.StatusOrganization" Multiplicity="0..1" />
+          <End Role="Organization" Type="Self.Organization" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="StatusOrganization">
+              <PropertyRef Name="IdStatusOrganization" />
+            </Principal>
+            <Dependent Role="Organization">
+              <PropertyRef Name="IdStatusOrganization" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Player_Country">
+          <End Role="Country" Type="Self.Country" Multiplicity="0..1" />
+          <End Role="Player" Type="Self.Player" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Country">
+              <PropertyRef Name="IdCountry" />
+            </Principal>
+            <Dependent Role="Player">
+              <PropertyRef Name="IdCountry" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Player_Gender">
+          <End Role="Gender" Type="Self.Gender" Multiplicity="0..1" />
+          <End Role="Player" Type="Self.Player" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Gender">
+              <PropertyRef Name="IdGender" />
+            </Principal>
+            <Dependent Role="Player">
+              <PropertyRef Name="IdGender" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Player_Position">
+          <End Role="Position" Type="Self.Position" Multiplicity="0..1" />
+          <End Role="Player" Type="Self.Player" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Position">
+              <PropertyRef Name="IdPosition" />
+            </Principal>
+            <Dependent Role="Player">
+              <PropertyRef Name="IdPosition" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_PlayerInTeam_Player">
+          <End Role="Player" Type="Self.Player" Multiplicity="0..1" />
+          <End Role="PlayerInTeam" Type="Self.PlayerInTeam" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Player">
+              <PropertyRef Name="IdPlayer" />
+            </Principal>
+            <Dependent Role="PlayerInTeam">
+              <PropertyRef Name="IdPlayer" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_PlayerInTeam_Season">
+          <End Role="Season" Type="Self.Season" Multiplicity="0..1" />
+          <End Role="PlayerInTeam" Type="Self.PlayerInTeam" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Season">
+              <PropertyRef Name="IdSeason" />
+            </Principal>
+            <Dependent Role="PlayerInTeam">
+              <PropertyRef Name="IdSeason" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_PlayerInTeam_Team">
+          <End Role="Team" Type="Self.Team" Multiplicity="0..1" />
+          <End Role="PlayerInTeam" Type="Self.PlayerInTeam" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Team">
+              <PropertyRef Name="IdTeam" />
+            </Principal>
+            <Dependent Role="PlayerInTeam">
+              <PropertyRef Name="IdTeam" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_PlayerStatistic_Player">
+          <End Role="Player" Type="Self.Player" Multiplicity="0..1" />
+          <End Role="PlayerStatistic" Type="Self.PlayerStatistic" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Player">
+              <PropertyRef Name="IdPlayer" />
+            </Principal>
+            <Dependent Role="PlayerStatistic">
+              <PropertyRef Name="IdPlayer" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_PlayerStatistic_Team">
+          <End Role="Team" Type="Self.Team" Multiplicity="0..1" />
+          <End Role="PlayerStatistic" Type="Self.PlayerStatistic" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Team">
+              <PropertyRef Name="IdTeam" />
+            </Principal>
+            <Dependent Role="PlayerStatistic">
+              <PropertyRef Name="IdTeam" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_PostSeason_Season">
+          <End Role="Season" Type="Self.Season" Multiplicity="0..1" />
+          <End Role="PostSeason" Type="Self.PostSeason" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Season">
+              <PropertyRef Name="IdSeason" />
+            </Principal>
+            <Dependent Role="PostSeason">
+              <PropertyRef Name="IdSeason" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_PostSeason_Team">
+          <End Role="Team" Type="Self.Team" Multiplicity="0..1" />
+          <End Role="PostSeason" Type="Self.PostSeason" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Team">
+              <PropertyRef Name="IdTeam" />
+            </Principal>
+            <Dependent Role="PostSeason">
+              <PropertyRef Name="IdTeam" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Team_Division">
+          <End Role="Division" Type="Self.Division" Multiplicity="0..1" />
+          <End Role="Team" Type="Self.Team" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Division">
+              <PropertyRef Name="IdDivision" />
+            </Principal>
+            <Dependent Role="Team">
+              <PropertyRef Name="IdDivision" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_User_Gender">
+          <End Role="Gender" Type="Self.Gender" Multiplicity="0..1" />
+          <End Role="User" Type="Self.User" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Gender">
+              <PropertyRef Name="IdGender" />
+            </Principal>
+            <Dependent Role="User">
+              <PropertyRef Name="IdGender" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_User_Role">
+          <End Role="Role" Type="Self.Role" Multiplicity="0..1" />
+          <End Role="User" Type="Self.User" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Role">
+              <PropertyRef Name="IdRole" />
+            </Principal>
+            <Dependent Role="User">
+              <PropertyRef Name="IdRole" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <EntityContainer Name="Хранилище PracticeNBAModelContainer">
+          <EntitySet Name="ActionType" EntityType="Self.ActionType" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Conference" EntityType="Self.Conference" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Country" EntityType="Self.Country" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Department" EntityType="Self.Department" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Division" EntityType="Self.Division" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Gender" EntityType="Self.Gender" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Image" EntityType="Self.Image" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Matchup" EntityType="Self.Matchup" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="MatchupDetail" EntityType="Self.MatchupDetail" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="MatchupLogs" EntityType="Self.MatchupLogs" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="MatchupType" EntityType="Self.MatchupType" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Organization" EntityType="Self.Organization" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Player" EntityType="Self.Player" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="PlayerInTeam" EntityType="Self.PlayerInTeam" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="PlayerStatistic" EntityType="Self.PlayerStatistic" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Position" EntityType="Self.Position" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="PostSeason" EntityType="Self.PostSeason" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Quarter" EntityType="Self.Quarter" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Role" EntityType="Self.Role" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Season" EntityType="Self.Season" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Status" EntityType="Self.Status" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="StatusOrganization" EntityType="Self.StatusOrganization" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Team" EntityType="Self.Team" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="User" EntityType="Self.User" Schema="dbo" store:Type="Tables" />
+          <AssociationSet Name="FK_Department_Organization" Association="Self.FK_Department_Organization">
+            <End Role="Organization" EntitySet="Organization" />
+            <End Role="Department" EntitySet="Department" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Division_Conference" Association="Self.FK_Division_Conference">
+            <End Role="Conference" EntitySet="Conference" />
+            <End Role="Division" EntitySet="Division" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Matchup_MatchupType" Association="Self.FK_Matchup_MatchupType">
+            <End Role="MatchupType" EntitySet="MatchupType" />
+            <End Role="Matchup" EntitySet="Matchup" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Matchup_Season" Association="Self.FK_Matchup_Season">
+            <End Role="Season" EntitySet="Season" />
+            <End Role="Matchup" EntitySet="Matchup" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Matchup_Status" Association="Self.FK_Matchup_Status">
+            <End Role="Status" EntitySet="Status" />
+            <End Role="Matchup" EntitySet="Matchup" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Matchup_Team" Association="Self.FK_Matchup_Team">
+            <End Role="Team" EntitySet="Team" />
+            <End Role="Matchup" EntitySet="Matchup" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Matchup_Team1" Association="Self.FK_Matchup_Team1">
+            <End Role="Team" EntitySet="Team" />
+            <End Role="Matchup" EntitySet="Matchup" />
+          </AssociationSet>
+          <AssociationSet Name="FK_MatchupDetail_Matchup" Association="Self.FK_MatchupDetail_Matchup">
+            <End Role="Matchup" EntitySet="Matchup" />
+            <End Role="MatchupDetail" EntitySet="MatchupDetail" />
+          </AssociationSet>
+          <AssociationSet Name="FK_MatchupDetail_Quarter" Association="Self.FK_MatchupDetail_Quarter">
+            <End Role="Quarter" EntitySet="Quarter" />
+            <End Role="MatchupDetail" EntitySet="MatchupDetail" />
+          </AssociationSet>
+          <AssociationSet Name="FK_MatchupLogs_ActionType" Association="Self.FK_MatchupLogs_ActionType">
+            <End Role="ActionType" EntitySet="ActionType" />
+            <End Role="MatchupLogs" EntitySet="MatchupLogs" />
+          </AssociationSet>
+          <AssociationSet Name="FK_MatchupLogs_Matchup" Association="Self.FK_MatchupLogs_Matchup">
+            <End Role="Matchup" EntitySet="Matchup" />
+            <End Role="MatchupLogs" EntitySet="MatchupLogs" />
+          </AssociationSet>
+          <AssociationSet Name="FK_MatchupLogs_Player" Association="Self.FK_MatchupLogs_Player">
+            <End Role="Player" EntitySet="Player" />
+            <End Role="MatchupLogs" EntitySet="MatchupLogs" />
+          </AssociationSet>
+          <AssociationSet Name="FK_MatchupLogs_Quarter" Association="Self.FK_MatchupLogs_Quarter">
+            <End Role="Quarter" EntitySet="Quarter" />
+            <End Role="MatchupLogs" EntitySet="MatchupLogs" />
+          </AssociationSet>
+          <AssociationSet Name="FK_MatchupLogs_Team" Association="Self.FK_MatchupLogs_Team">
+            <End Role="Team" EntitySet="Team" />
+            <End Role="MatchupLogs" EntitySet="MatchupLogs" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Organization_StatusOrganization" Association="Self.FK_Organization_StatusOrganization">
+            <End Role="StatusOrganization" EntitySet="StatusOrganization" />
+            <End Role="Organization" EntitySet="Organization" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Player_Country" Association="Self.FK_Player_Country">
+            <End Role="Country" EntitySet="Country" />
+            <End Role="Player" EntitySet="Player" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Player_Gender" Association="Self.FK_Player_Gender">
+            <End Role="Gender" EntitySet="Gender" />
+            <End Role="Player" EntitySet="Player" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Player_Position" Association="Self.FK_Player_Position">
+            <End Role="Position" EntitySet="Position" />
+            <End Role="Player" EntitySet="Player" />
+          </AssociationSet>
+          <AssociationSet Name="FK_PlayerInTeam_Player" Association="Self.FK_PlayerInTeam_Player">
+            <End Role="Player" EntitySet="Player" />
+            <End Role="PlayerInTeam" EntitySet="PlayerInTeam" />
+          </AssociationSet>
+          <AssociationSet Name="FK_PlayerInTeam_Season" Association="Self.FK_PlayerInTeam_Season">
+            <End Role="Season" EntitySet="Season" />
+            <End Role="PlayerInTeam" EntitySet="PlayerInTeam" />
+          </AssociationSet>
+          <AssociationSet Name="FK_PlayerInTeam_Team" Association="Self.FK_PlayerInTeam_Team">
+            <End Role="Team" EntitySet="Team" />
+            <End Role="PlayerInTeam" EntitySet="PlayerInTeam" />
+          </AssociationSet>
+          <AssociationSet Name="FK_PlayerStatistic_Player" Association="Self.FK_PlayerStatistic_Player">
+            <End Role="Player" EntitySet="Player" />
+            <End Role="PlayerStatistic" EntitySet="PlayerStatistic" />
+          </AssociationSet>
+          <AssociationSet Name="FK_PlayerStatistic_Team" Association="Self.FK_PlayerStatistic_Team">
+            <End Role="Team" EntitySet="Team" />
+            <End Role="PlayerStatistic" EntitySet="PlayerStatistic" />
+          </AssociationSet>
+          <AssociationSet Name="FK_PostSeason_Season" Association="Self.FK_PostSeason_Season">
+            <End Role="Season" EntitySet="Season" />
+            <End Role="PostSeason" EntitySet="PostSeason" />
+          </AssociationSet>
+          <AssociationSet Name="FK_PostSeason_Team" Association="Self.FK_PostSeason_Team">
+            <End Role="Team" EntitySet="Team" />
+            <End Role="PostSeason" EntitySet="PostSeason" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Team_Division" Association="Self.FK_Team_Division">
+            <End Role="Division" EntitySet="Division" />
+            <End Role="Team" EntitySet="Team" />
+          </AssociationSet>
+          <AssociationSet Name="FK_User_Gender" Association="Self.FK_User_Gender">
+            <End Role="Gender" EntitySet="Gender" />
+            <End Role="User" EntitySet="User" />
+          </AssociationSet>
+          <AssociationSet Name="FK_User_Role" Association="Self.FK_User_Role">
+            <End Role="Role" EntitySet="Role" />
+            <End Role="User" EntitySet="User" />
+          </AssociationSet>
+        </EntityContainer>
+      </Schema></edmx:StorageModels>
+    <!-- CSDL content -->
+    <edmx:ConceptualModels>
+      <Schema Namespace="PracticeNBAModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
+        <EntityType Name="ActionType">
+          <Key>
+            <PropertyRef Name="IdActionType" />
+          </Key>
+          <Property Name="IdActionType" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="NameActionType" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <NavigationProperty Name="MatchupLogs" Relationship="Self.FK_MatchupLogs_ActionType" FromRole="ActionType" ToRole="MatchupLogs" />
+        </EntityType>
+        <EntityType Name="Conference">
+          <Key>
+            <PropertyRef Name="IdConference" />
+          </Key>
+          <Property Name="IdConference" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="NameConference" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <NavigationProperty Name="Division" Relationship="Self.FK_Division_Conference" FromRole="Conference" ToRole="Division" />
+        </EntityType>
+        <EntityType Name="Country">
+          <Key>
+            <PropertyRef Name="IdCountry" />
+          </Key>
+          <Property Name="IdCountry" Type="Int32" Nullable="false" />
+          <Property Name="NameCountry" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="CodeCountry" Type="String" MaxLength="3" FixedLength="true" Unicode="false" />
+          <NavigationProperty Name="Player" Relationship="Self.FK_Player_Country" FromRole="Country" ToRole="Player" />
+        </EntityType>
+        <EntityType Name="Department">
+          <Key>
+            <PropertyRef Name="IdDepartment" />
+          </Key>
+          <Property Name="IdDepartment" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="NameDepartment" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="IdOrganization" Type="Int32" />
+          <NavigationProperty Name="Organization" Relationship="Self.FK_Department_Organization" FromRole="Department" ToRole="Organization" />
+        </EntityType>
+        <EntityType Name="Division">
+          <Key>
+            <PropertyRef Name="IdDivision" />
+          </Key>
+          <Property Name="IdDivision" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="NameDivision" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="IdConference" Type="Int32" />
+          <NavigationProperty Name="Conference" Relationship="Self.FK_Division_Conference" FromRole="Division" ToRole="Conference" />
+          <NavigationProperty Name="Team" Relationship="Self.FK_Team_Division" FromRole="Division" ToRole="Team" />
+        </EntityType>
+        <EntityType Name="Gender">
+          <Key>
+            <PropertyRef Name="IdGender" />
+          </Key>
+          <Property Name="IdGender" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="NameGender" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <NavigationProperty Name="Player" Relationship="Self.FK_Player_Gender" FromRole="Gender" ToRole="Player" />
+          <NavigationProperty Name="User" Relationship="Self.FK_User_Gender" FromRole="Gender" ToRole="User" />
+        </EntityType>
+        <EntityType Name="Image">
+          <Key>
+            <PropertyRef Name="IdImage" />
+          </Key>
+          <Property Name="IdImage" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="Image1" Type="Binary" MaxLength="Max" FixedLength="false" Nullable="false" />
+          <Property Name="Description" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="NumberOfLikes" Type="Int32" />
+          <Property Name="CreateTime" Type="DateTime" Precision="3" />
+        </EntityType>
+        <EntityType Name="Matchup">
+          <Key>
+            <PropertyRef Name="IdMatchup" />
+          </Key>
+          <Property Name="IdMatchup" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="IdSeason" Type="Int32" />
+          <Property Name="IdMatchupType" Type="Int32" />
+          <Property Name="IdTeamAway" Type="Int32" />
+          <Property Name="IdTeamHome" Type="Int32" />
+          <Property Name="Starttime" Type="DateTime" Precision="3" />
+          <Property Name="TeamAwayScore" Type="Int32" />
+          <Property Name="TeamHomeScore" Type="Int32" />
+          <Property Name="Location" Type="String" MaxLength="200" FixedLength="false" Unicode="false" />
+          <Property Name="IdStatus" Type="Int32" />
+          <NavigationProperty Name="MatchupType" Relationship="Self.FK_Matchup_MatchupType" FromRole="Matchup" ToRole="MatchupType" />
+          <NavigationProperty Name="Season" Relationship="Self.FK_Matchup_Season" FromRole="Matchup" ToRole="Season" />
+          <NavigationProperty Name="Status" Relationship="Self.FK_Matchup_Status" FromRole="Matchup" ToRole="Status" />
+          <NavigationProperty Name="Team" Relationship="Self.FK_Matchup_Team" FromRole="Matchup" ToRole="Team" />
+          <NavigationProperty Name="Team1" Relationship="Self.FK_Matchup_Team1" FromRole="Matchup" ToRole="Team" />
+          <NavigationProperty Name="MatchupDetail" Relationship="Self.FK_MatchupDetail_Matchup" FromRole="Matchup" ToRole="MatchupDetail" />
+          <NavigationProperty Name="MatchupLogs" Relationship="Self.FK_MatchupLogs_Matchup" FromRole="Matchup" ToRole="MatchupLogs" />
+        </EntityType>
+        <EntityType Name="MatchupDetail">
+          <Key>
+            <PropertyRef Name="IdMatchupDetail" />
+          </Key>
+          <Property Name="IdMatchupDetail" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="IdMatchup" Type="Int32" />
+          <Property Name="IdQuarter" Type="Int32" />
+          <Property Name="TeamAwayScore" Type="Int32" />
+          <Property Name="TeamHomeScore" Type="Int32" />
+          <NavigationProperty Name="Matchup" Relationship="Self.FK_MatchupDetail_Matchup" FromRole="MatchupDetail" ToRole="Matchup" />
+          <NavigationProperty Name="Quarter" Relationship="Self.FK_MatchupDetail_Quarter" FromRole="MatchupDetail" ToRole="Quarter" />
+        </EntityType>
+        <EntityType Name="MatchupLogs">
+          <Key>
+            <PropertyRef Name="IdMatchupLogs" />
+          </Key>
+          <Property Name="IdMatchupLogs" Type="Int32" Nullable="false" />
+          <Property Name="IdMatchup" Type="Int32" />
+          <Property Name="IdQuarter" Type="Int32" />
+          <Property Name="OccurTime" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
+          <Property Name="IdTeam" Type="Int32" />
+          <Property Name="IdPlayer" Type="Int32" />
+          <Property Name="IdActionType" Type="Int32" />
+          <Property Name="Remark" Type="String" MaxLength="300" FixedLength="false" Unicode="false" />
+          <NavigationProperty Name="ActionType" Relationship="Self.FK_MatchupLogs_ActionType" FromRole="MatchupLogs" ToRole="ActionType" />
+          <NavigationProperty Name="Matchup" Relationship="Self.FK_MatchupLogs_Matchup" FromRole="MatchupLogs" ToRole="Matchup" />
+          <NavigationProperty Name="Player" Relationship="Self.FK_MatchupLogs_Player" FromRole="MatchupLogs" ToRole="Player" />
+          <NavigationProperty Name="Quarter" Relationship="Self.FK_MatchupLogs_Quarter" FromRole="MatchupLogs" ToRole="Quarter" />
+          <NavigationProperty Name="Team" Relationship="Self.FK_MatchupLogs_Team" FromRole="MatchupLogs" ToRole="Team" />
+        </EntityType>
+        <EntityType Name="MatchupType">
+          <Key>
+            <PropertyRef Name="IdMatchupType" />
+          </Key>
+          <Property Name="IdMatchupType" Type="Int32" Nullable="false" />
+          <Property Name="NameMatchupType" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <NavigationProperty Name="Matchup" Relationship="Self.FK_Matchup_MatchupType" FromRole="MatchupType" ToRole="Matchup" />
+        </EntityType>
+        <EntityType Name="Organization">
+          <Key>
+            <PropertyRef Name="IdOrganization" />
+          </Key>
+          <Property Name="IdOrganization" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="OrganizationName" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="Info" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" />
+          <Property Name="IdStatusOrganization" Type="Int32" />
+          <NavigationProperty Name="Department" Relationship="Self.FK_Department_Organization" FromRole="Organization" ToRole="Department" />
+          <NavigationProperty Name="StatusOrganization" Relationship="Self.FK_Organization_StatusOrganization" FromRole="Organization" ToRole="StatusOrganization" />
+        </EntityType>
+        <EntityType Name="Player">
+          <Key>
+            <PropertyRef Name="IdPlayer" />
+          </Key>
+          <Property Name="IdPlayer" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="Surename" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="Patronymic" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="IdPosition" Type="Int32" />
+          <Property Name="JoinYear" Type="DateTime" Precision="0" />
+          <Property Name="IdGender" Type="Int32" />
+          <Property Name="Height" Type="Decimal" Precision="10" Scale="2" />
+          <Property Name="Weight" Type="Decimal" Precision="10" Scale="2" />
+          <Property Name="DateOfBirth" Type="DateTime" Precision="0" />
+          <Property Name="College" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="Email" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="IdCountry" Type="Int32" />
+          <Property Name="IsRetiment" Type="Boolean" />
+          <Property Name="RetirmentTime" Type="DateTime" Precision="0" />
+          <Property Name="Image" Type="Binary" MaxLength="Max" FixedLength="false" />
+          <NavigationProperty Name="Country" Relationship="Self.FK_Player_Country" FromRole="Player" ToRole="Country" />
+          <NavigationProperty Name="Gender" Relationship="Self.FK_Player_Gender" FromRole="Player" ToRole="Gender" />
+          <NavigationProperty Name="MatchupLogs" Relationship="Self.FK_MatchupLogs_Player" FromRole="Player" ToRole="MatchupLogs" />
+          <NavigationProperty Name="Position" Relationship="Self.FK_Player_Position" FromRole="Player" ToRole="Position" />
+          <NavigationProperty Name="PlayerInTeam" Relationship="Self.FK_PlayerInTeam_Player" FromRole="Player" ToRole="PlayerInTeam" />
+          <NavigationProperty Name="PlayerStatistic" Relationship="Self.FK_PlayerStatistic_Player" FromRole="Player" ToRole="PlayerStatistic" />
+        </EntityType>
+        <EntityType Name="PlayerInTeam">
+          <Key>
+            <PropertyRef Name="IdPlayerInTeam" />
+          </Key>
+          <Property Name="IdPlayerInTeam" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="IdPlayer" Type="Int32" />
+          <Property Name="IdTeam" Type="Int32" />
+          <Property Name="IdSeason" Type="Int32" />
+          <Property Name="ShirtNumber" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
+          <Property Name="Salary" Type="Decimal" Precision="10" Scale="2" />
+          <Property Name="StarterIndex" Type="Int32" />
+          <NavigationProperty Name="Player" Relationship="Self.FK_PlayerInTeam_Player" FromRole="PlayerInTeam" ToRole="Player" />
+          <NavigationProperty Name="Season" Relationship="Self.FK_PlayerInTeam_Season" FromRole="PlayerInTeam" ToRole="Season" />
+          <NavigationProperty Name="Team" Relationship="Self.FK_PlayerInTeam_Team" FromRole="PlayerInTeam" ToRole="Team" />
+        </EntityType>
+        <EntityType Name="PlayerStatistic">
+          <Key>
+            <PropertyRef Name="IdPlayerStatistic" />
+          </Key>
+          <Property Name="IdPlayerStatistic" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="IdMatchup" Type="Int32" />
+          <Property Name="IdTeam" Type="Int32" />
+          <Property Name="IdPlayer" Type="Int32" />
+          <Property Name="IsStarting" Type="Int32" />
+          <Property Name="Min" Type="Decimal" Precision="10" Scale="2" />
+          <Property Name="Point" Type="Int32" />
+          <Property Name="Assist" Type="Int32" />
+          <Property Name="FieldGoalMade" Type="Int32" />
+          <Property Name="FieldGoalMissed" Type="Int32" />
+          <Property Name="ThreePointFieldGoalMade" Type="Int32" />
+          <Property Name="ThreePointFieldGoalMissed" Type="Int32" />
+          <Property Name="FreeThrowMade" Type="Int32" />
+          <Property Name="FreeThrowMissed" Type="Int32" />
+          <Property Name="Rebound" Type="Int32" />
+          <Property Name="OFFR" Type="Int32" />
+          <Property Name="DFFR" Type="Int32" />
+          <Property Name="Steal" Type="Int32" />
+          <Property Name="Block" Type="Int32" />
+          <Property Name="Turnover" Type="Int32" />
+          <Property Name="Foul" Type="Int32" />
+          <NavigationProperty Name="Player" Relationship="Self.FK_PlayerStatistic_Player" FromRole="PlayerStatistic" ToRole="Player" />
+          <NavigationProperty Name="Team" Relationship="Self.FK_PlayerStatistic_Team" FromRole="PlayerStatistic" ToRole="Team" />
+        </EntityType>
+        <EntityType Name="Position">
+          <Key>
+            <PropertyRef Name="IdPosition" />
+          </Key>
+          <Property Name="IdPosition" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="NamePosition" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="Abbr" Type="String" MaxLength="3" FixedLength="true" Unicode="false" />
+          <NavigationProperty Name="Player" Relationship="Self.FK_Player_Position" FromRole="Position" ToRole="Player" />
+        </EntityType>
+        <EntityType Name="PostSeason">
+          <Key>
+            <PropertyRef Name="IdPostSeason" />
+          </Key>
+          <Property Name="IdPostSeason" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="IdSeason" Type="Int32" />
+          <Property Name="IdTeam" Type="Int32" />
+          <Property Name="Rank" Type="Int32" />
+          <NavigationProperty Name="Season" Relationship="Self.FK_PostSeason_Season" FromRole="PostSeason" ToRole="Season" />
+          <NavigationProperty Name="Team" Relationship="Self.FK_PostSeason_Team" FromRole="PostSeason" ToRole="Team" />
+        </EntityType>
+        <EntityType Name="Quarter">
+          <Key>
+            <PropertyRef Name="IdQuarter" />
+          </Key>
+          <Property Name="IdQuarter" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="NameQuarter" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <NavigationProperty Name="MatchupDetail" Relationship="Self.FK_MatchupDetail_Quarter" FromRole="Quarter" ToRole="MatchupDetail" />
+          <NavigationProperty Name="MatchupLogs" Relationship="Self.FK_MatchupLogs_Quarter" FromRole="Quarter" ToRole="MatchupLogs" />
+        </EntityType>
+        <EntityType Name="Role">
+          <Key>
+            <PropertyRef Name="IdRole" />
+          </Key>
+          <Property Name="IdRole" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="RoleName" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <NavigationProperty Name="User" Relationship="Self.FK_User_Role" FromRole="Role" ToRole="User" />
+        </EntityType>
+        <EntityType Name="Season">
+          <Key>
+            <PropertyRef Name="IdSeason" />
+          </Key>
+          <Property Name="IdSeason" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="NameSeason" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <NavigationProperty Name="Matchup" Relationship="Self.FK_Matchup_Season" FromRole="Season" ToRole="Matchup" />
+          <NavigationProperty Name="PlayerInTeam" Relationship="Self.FK_PlayerInTeam_Season" FromRole="Season" ToRole="PlayerInTeam" />
+          <NavigationProperty Name="PostSeason" Relationship="Self.FK_PostSeason_Season" FromRole="Season" ToRole="PostSeason" />
+        </EntityType>
+        <EntityType Name="Status">
+          <Key>
+            <PropertyRef Name="IdStatus" />
+          </Key>
+          <Property Name="IdStatus" Type="Int32" Nullable="false" />
+          <Property Name="NameStatus" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <NavigationProperty Name="Matchup" Relationship="Self.FK_Matchup_Status" FromRole="Status" ToRole="Matchup" />
+        </EntityType>
+        <EntityType Name="StatusOrganization">
+          <Key>
+            <PropertyRef Name="IdStatusOrganization" />
+          </Key>
+          <Property Name="IdStatusOrganization" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="NameStatusOrganization" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <NavigationProperty Name="Organization" Relationship="Self.FK_Organization_StatusOrganization" FromRole="StatusOrganization" ToRole="Organization" />
+        </EntityType>
+        <EntityType Name="sysdiagrams">
+          <Key>
+            <PropertyRef Name="diagram_id" />
+          </Key>
+          <Property Name="name" Type="String" MaxLength="128" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="principal_id" Type="Int32" Nullable="false" />
+          <Property Name="diagram_id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="version" Type="Int32" />
+          <Property Name="definition" Type="Binary" MaxLength="Max" FixedLength="false" />
+        </EntityType>
+        <EntityType Name="Team">
+          <Key>
+            <PropertyRef Name="IdTeam" />
+          </Key>
+          <Property Name="IdTeam" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="TeamName" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="IdDivision" Type="Int32" />
+          <Property Name="Couch" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="Abbr" Type="String" MaxLength="3" FixedLength="true" Unicode="false" />
+          <Property Name="Stadium" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
+          <Property Name="Logo" Type="Binary" MaxLength="Max" FixedLength="false" />
+          <NavigationProperty Name="Division" Relationship="Self.FK_Team_Division" FromRole="Team" ToRole="Division" />
+          <NavigationProperty Name="Matchup" Relationship="Self.FK_Matchup_Team" FromRole="Team" ToRole="Matchup" />
+          <NavigationProperty Name="Matchup1" Relationship="Self.FK_Matchup_Team1" FromRole="Team" ToRole="Matchup" />
+          <NavigationProperty Name="MatchupLogs" Relationship="Self.FK_MatchupLogs_Team" FromRole="Team" ToRole="MatchupLogs" />
+          <NavigationProperty Name="PlayerInTeam" Relationship="Self.FK_PlayerInTeam_Team" FromRole="Team" ToRole="PlayerInTeam" />
+          <NavigationProperty Name="PlayerStatistic" Relationship="Self.FK_PlayerStatistic_Team" FromRole="Team" ToRole="PlayerStatistic" />
+          <NavigationProperty Name="PostSeason" Relationship="Self.FK_PostSeason_Team" FromRole="Team" ToRole="PostSeason" />
+        </EntityType>
+        <EntityType Name="User">
+          <Key>
+            <PropertyRef Name="IdUser" />
+          </Key>
+          <Property Name="IdUser" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="Surename" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="Patronymic" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="LoginName" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
+          <Property Name="Password" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="IdGender" Type="Int32" />
+          <Property Name="DateOfBirth" Type="DateTime" Precision="0" />
+          <Property Name="Phone" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
+          <Property Name="Email" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
+          <Property Name="IdRole" Type="Int32" />
+          <NavigationProperty Name="Gender" Relationship="Self.FK_User_Gender" FromRole="User" ToRole="Gender" />
+          <NavigationProperty Name="Role" Relationship="Self.FK_User_Role" FromRole="User" ToRole="Role" />
+        </EntityType>
+        <Association Name="FK_MatchupLogs_ActionType">
+          <End Role="ActionType" Type="Self.ActionType" Multiplicity="0..1" />
+          <End Role="MatchupLogs" Type="Self.MatchupLogs" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="ActionType">
+              <PropertyRef Name="IdActionType" />
+            </Principal>
+            <Dependent Role="MatchupLogs">
+              <PropertyRef Name="IdActionType" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Division_Conference">
+          <End Role="Conference" Type="Self.Conference" Multiplicity="0..1" />
+          <End Role="Division" Type="Self.Division" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Conference">
+              <PropertyRef Name="IdConference" />
+            </Principal>
+            <Dependent Role="Division">
+              <PropertyRef Name="IdConference" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Player_Country">
+          <End Role="Country" Type="Self.Country" Multiplicity="0..1" />
+          <End Role="Player" Type="Self.Player" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Country">
+              <PropertyRef Name="IdCountry" />
+            </Principal>
+            <Dependent Role="Player">
+              <PropertyRef Name="IdCountry" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Department_Organization">
+          <End Role="Organization" Type="Self.Organization" Multiplicity="0..1" />
+          <End Role="Department" Type="Self.Department" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Organization">
+              <PropertyRef Name="IdOrganization" />
+            </Principal>
+            <Dependent Role="Department">
+              <PropertyRef Name="IdOrganization" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Team_Division">
+          <End Role="Division" Type="Self.Division" Multiplicity="0..1" />
+          <End Role="Team" Type="Self.Team" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Division">
+              <PropertyRef Name="IdDivision" />
+            </Principal>
+            <Dependent Role="Team">
+              <PropertyRef Name="IdDivision" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Player_Gender">
+          <End Role="Gender" Type="Self.Gender" Multiplicity="0..1" />
+          <End Role="Player" Type="Self.Player" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Gender">
+              <PropertyRef Name="IdGender" />
+            </Principal>
+            <Dependent Role="Player">
+              <PropertyRef Name="IdGender" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_User_Gender">
+          <End Role="Gender" Type="Self.Gender" Multiplicity="0..1" />
+          <End Role="User" Type="Self.User" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Gender">
+              <PropertyRef Name="IdGender" />
+            </Principal>
+            <Dependent Role="User">
+              <PropertyRef Name="IdGender" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Matchup_MatchupType">
+          <End Role="MatchupType" Type="Self.MatchupType" Multiplicity="0..1" />
+          <End Role="Matchup" Type="Self.Matchup" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="MatchupType">
+              <PropertyRef Name="IdMatchupType" />
+            </Principal>
+            <Dependent Role="Matchup">
+              <PropertyRef Name="IdMatchupType" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Matchup_Season">
+          <End Role="Season" Type="Self.Season" Multiplicity="0..1" />
+          <End Role="Matchup" Type="Self.Matchup" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Season">
+              <PropertyRef Name="IdSeason" />
+            </Principal>
+            <Dependent Role="Matchup">
+              <PropertyRef Name="IdSeason" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Matchup_Status">
+          <End Role="Status" Type="Self.Status" Multiplicity="0..1" />
+          <End Role="Matchup" Type="Self.Matchup" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Status">
+              <PropertyRef Name="IdStatus" />
+            </Principal>
+            <Dependent Role="Matchup">
+              <PropertyRef Name="IdStatus" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Matchup_Team">
+          <End Role="Team" Type="Self.Team" Multiplicity="0..1" />
+          <End Role="Matchup" Type="Self.Matchup" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Team">
+              <PropertyRef Name="IdTeam" />
+            </Principal>
+            <Dependent Role="Matchup">
+              <PropertyRef Name="IdTeamAway" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Matchup_Team1">
+          <End Role="Team" Type="Self.Team" Multiplicity="0..1" />
+          <End Role="Matchup" Type="Self.Matchup" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Team">
+              <PropertyRef Name="IdTeam" />
+            </Principal>
+            <Dependent Role="Matchup">
+              <PropertyRef Name="IdTeamHome" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_MatchupDetail_Matchup">
+          <End Role="Matchup" Type="Self.Matchup" Multiplicity="0..1" />
+          <End Role="MatchupDetail" Type="Self.MatchupDetail" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Matchup">
+              <PropertyRef Name="IdMatchup" />
+            </Principal>
+            <Dependent Role="MatchupDetail">
+              <PropertyRef Name="IdMatchup" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_MatchupLogs_Matchup">
+          <End Role="Matchup" Type="Self.Matchup" Multiplicity="0..1" />
+          <End Role="MatchupLogs" Type="Self.MatchupLogs" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Matchup">
+              <PropertyRef Name="IdMatchup" />
+            </Principal>
+            <Dependent Role="MatchupLogs">
+              <PropertyRef Name="IdMatchup" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_MatchupDetail_Quarter">
+          <End Role="Quarter" Type="Self.Quarter" Multiplicity="0..1" />
+          <End Role="MatchupDetail" Type="Self.MatchupDetail" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Quarter">
+              <PropertyRef Name="IdQuarter" />
+            </Principal>
+            <Dependent Role="MatchupDetail">
+              <PropertyRef Name="IdQuarter" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_MatchupLogs_Player">
+          <End Role="Player" Type="Self.Player" Multiplicity="0..1" />
+          <End Role="MatchupLogs" Type="Self.MatchupLogs" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Player">
+              <PropertyRef Name="IdPlayer" />
+            </Principal>
+            <Dependent Role="MatchupLogs">
+              <PropertyRef Name="IdPlayer" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_MatchupLogs_Quarter">
+          <End Role="Quarter" Type="Self.Quarter" Multiplicity="0..1" />
+          <End Role="MatchupLogs" Type="Self.MatchupLogs" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Quarter">
+              <PropertyRef Name="IdQuarter" />
+            </Principal>
+            <Dependent Role="MatchupLogs">
+              <PropertyRef Name="IdQuarter" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_MatchupLogs_Team">
+          <End Role="Team" Type="Self.Team" Multiplicity="0..1" />
+          <End Role="MatchupLogs" Type="Self.MatchupLogs" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Team">
+              <PropertyRef Name="IdTeam" />
+            </Principal>
+            <Dependent Role="MatchupLogs">
+              <PropertyRef Name="IdTeam" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Organization_StatusOrganization">
+          <End Role="StatusOrganization" Type="Self.StatusOrganization" Multiplicity="0..1" />
+          <End Role="Organization" Type="Self.Organization" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="StatusOrganization">
+              <PropertyRef Name="IdStatusOrganization" />
+            </Principal>
+            <Dependent Role="Organization">
+              <PropertyRef Name="IdStatusOrganization" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Player_Position">
+          <End Role="Position" Type="Self.Position" Multiplicity="0..1" />
+          <End Role="Player" Type="Self.Player" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Position">
+              <PropertyRef Name="IdPosition" />
+            </Principal>
+            <Dependent Role="Player">
+              <PropertyRef Name="IdPosition" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_PlayerInTeam_Player">
+          <End Role="Player" Type="Self.Player" Multiplicity="0..1" />
+          <End Role="PlayerInTeam" Type="Self.PlayerInTeam" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Player">
+              <PropertyRef Name="IdPlayer" />
+            </Principal>
+            <Dependent Role="PlayerInTeam">
+              <PropertyRef Name="IdPlayer" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_PlayerStatistic_Player">
+          <End Role="Player" Type="Self.Player" Multiplicity="0..1" />
+          <End Role="PlayerStatistic" Type="Self.PlayerStatistic" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Player">
+              <PropertyRef Name="IdPlayer" />
+            </Principal>
+            <Dependent Role="PlayerStatistic">
+              <PropertyRef Name="IdPlayer" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_PlayerInTeam_Season">
+          <End Role="Season" Type="Self.Season" Multiplicity="0..1" />
+          <End Role="PlayerInTeam" Type="Self.PlayerInTeam" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Season">
+              <PropertyRef Name="IdSeason" />
+            </Principal>
+            <Dependent Role="PlayerInTeam">
+              <PropertyRef Name="IdSeason" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_PlayerInTeam_Team">
+          <End Role="Team" Type="Self.Team" Multiplicity="0..1" />
+          <End Role="PlayerInTeam" Type="Self.PlayerInTeam" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Team">
+              <PropertyRef Name="IdTeam" />
+            </Principal>
+            <Dependent Role="PlayerInTeam">
+              <PropertyRef Name="IdTeam" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_PlayerStatistic_Team">
+          <End Role="Team" Type="Self.Team" Multiplicity="0..1" />
+          <End Role="PlayerStatistic" Type="Self.PlayerStatistic" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Team">
+              <PropertyRef Name="IdTeam" />
+            </Principal>
+            <Dependent Role="PlayerStatistic">
+              <PropertyRef Name="IdTeam" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_PostSeason_Season">
+          <End Role="Season" Type="Self.Season" Multiplicity="0..1" />
+          <End Role="PostSeason" Type="Self.PostSeason" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Season">
+              <PropertyRef Name="IdSeason" />
+            </Principal>
+            <Dependent Role="PostSeason">
+              <PropertyRef Name="IdSeason" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_PostSeason_Team">
+          <End Role="Team" Type="Self.Team" Multiplicity="0..1" />
+          <End Role="PostSeason" Type="Self.PostSeason" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Team">
+              <PropertyRef Name="IdTeam" />
+            </Principal>
+            <Dependent Role="PostSeason">
+              <PropertyRef Name="IdTeam" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_User_Role">
+          <End Role="Role" Type="Self.Role" Multiplicity="0..1" />
+          <End Role="User" Type="Self.User" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Role">
+              <PropertyRef Name="IdRole" />
+            </Principal>
+            <Dependent Role="User">
+              <PropertyRef Name="IdRole" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <EntityContainer Name="PracticeNBAEntities" annotation:LazyLoadingEnabled="true">
+          <EntitySet Name="ActionType" EntityType="Self.ActionType" />
+          <EntitySet Name="Conference" EntityType="Self.Conference" />
+          <EntitySet Name="Country" EntityType="Self.Country" />
+          <EntitySet Name="Department" EntityType="Self.Department" />
+          <EntitySet Name="Division" EntityType="Self.Division" />
+          <EntitySet Name="Gender" EntityType="Self.Gender" />
+          <EntitySet Name="Image" EntityType="Self.Image" />
+          <EntitySet Name="Matchup" EntityType="Self.Matchup" />
+          <EntitySet Name="MatchupDetail" EntityType="Self.MatchupDetail" />
+          <EntitySet Name="MatchupLogs" EntityType="Self.MatchupLogs" />
+          <EntitySet Name="MatchupType" EntityType="Self.MatchupType" />
+          <EntitySet Name="Organization" EntityType="Self.Organization" />
+          <EntitySet Name="Player" EntityType="Self.Player" />
+          <EntitySet Name="PlayerInTeam" EntityType="Self.PlayerInTeam" />
+          <EntitySet Name="PlayerStatistic" EntityType="Self.PlayerStatistic" />
+          <EntitySet Name="Position" EntityType="Self.Position" />
+          <EntitySet Name="PostSeason" EntityType="Self.PostSeason" />
+          <EntitySet Name="Quarter" EntityType="Self.Quarter" />
+          <EntitySet Name="Role" EntityType="Self.Role" />
+          <EntitySet Name="Season" EntityType="Self.Season" />
+          <EntitySet Name="Status" EntityType="Self.Status" />
+          <EntitySet Name="StatusOrganization" EntityType="Self.StatusOrganization" />
+          <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" />
+          <EntitySet Name="Team" EntityType="Self.Team" />
+          <EntitySet Name="User" EntityType="Self.User" />
+          <AssociationSet Name="FK_MatchupLogs_ActionType" Association="Self.FK_MatchupLogs_ActionType">
+            <End Role="ActionType" EntitySet="ActionType" />
+            <End Role="MatchupLogs" EntitySet="MatchupLogs" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Division_Conference" Association="Self.FK_Division_Conference">
+            <End Role="Conference" EntitySet="Conference" />
+            <End Role="Division" EntitySet="Division" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Player_Country" Association="Self.FK_Player_Country">
+            <End Role="Country" EntitySet="Country" />
+            <End Role="Player" EntitySet="Player" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Department_Organization" Association="Self.FK_Department_Organization">
+            <End Role="Organization" EntitySet="Organization" />
+            <End Role="Department" EntitySet="Department" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Team_Division" Association="Self.FK_Team_Division">
+            <End Role="Division" EntitySet="Division" />
+            <End Role="Team" EntitySet="Team" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Player_Gender" Association="Self.FK_Player_Gender">
+            <End Role="Gender" EntitySet="Gender" />
+            <End Role="Player" EntitySet="Player" />
+          </AssociationSet>
+          <AssociationSet Name="FK_User_Gender" Association="Self.FK_User_Gender">
+            <End Role="Gender" EntitySet="Gender" />
+            <End Role="User" EntitySet="User" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Matchup_MatchupType" Association="Self.FK_Matchup_MatchupType">
+            <End Role="MatchupType" EntitySet="MatchupType" />
+            <End Role="Matchup" EntitySet="Matchup" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Matchup_Season" Association="Self.FK_Matchup_Season">
+            <End Role="Season" EntitySet="Season" />
+            <End Role="Matchup" EntitySet="Matchup" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Matchup_Status" Association="Self.FK_Matchup_Status">
+            <End Role="Status" EntitySet="Status" />
+            <End Role="Matchup" EntitySet="Matchup" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Matchup_Team" Association="Self.FK_Matchup_Team">
+            <End Role="Team" EntitySet="Team" />
+            <End Role="Matchup" EntitySet="Matchup" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Matchup_Team1" Association="Self.FK_Matchup_Team1">
+            <End Role="Team" EntitySet="Team" />
+            <End Role="Matchup" EntitySet="Matchup" />
+          </AssociationSet>
+          <AssociationSet Name="FK_MatchupDetail_Matchup" Association="Self.FK_MatchupDetail_Matchup">
+            <End Role="Matchup" EntitySet="Matchup" />
+            <End Role="MatchupDetail" EntitySet="MatchupDetail" />
+          </AssociationSet>
+          <AssociationSet Name="FK_MatchupLogs_Matchup" Association="Self.FK_MatchupLogs_Matchup">
+            <End Role="Matchup" EntitySet="Matchup" />
+            <End Role="MatchupLogs" EntitySet="MatchupLogs" />
+          </AssociationSet>
+          <AssociationSet Name="FK_MatchupDetail_Quarter" Association="Self.FK_MatchupDetail_Quarter">
+            <End Role="Quarter" EntitySet="Quarter" />
+            <End Role="MatchupDetail" EntitySet="MatchupDetail" />
+          </AssociationSet>
+          <AssociationSet Name="FK_MatchupLogs_Player" Association="Self.FK_MatchupLogs_Player">
+            <End Role="Player" EntitySet="Player" />
+            <End Role="MatchupLogs" EntitySet="MatchupLogs" />
+          </AssociationSet>
+          <AssociationSet Name="FK_MatchupLogs_Quarter" Association="Self.FK_MatchupLogs_Quarter">
+            <End Role="Quarter" EntitySet="Quarter" />
+            <End Role="MatchupLogs" EntitySet="MatchupLogs" />
+          </AssociationSet>
+          <AssociationSet Name="FK_MatchupLogs_Team" Association="Self.FK_MatchupLogs_Team">
+            <End Role="Team" EntitySet="Team" />
+            <End Role="MatchupLogs" EntitySet="MatchupLogs" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Organization_StatusOrganization" Association="Self.FK_Organization_StatusOrganization">
+            <End Role="StatusOrganization" EntitySet="StatusOrganization" />
+            <End Role="Organization" EntitySet="Organization" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Player_Position" Association="Self.FK_Player_Position">
+            <End Role="Position" EntitySet="Position" />
+            <End Role="Player" EntitySet="Player" />
+          </AssociationSet>
+          <AssociationSet Name="FK_PlayerInTeam_Player" Association="Self.FK_PlayerInTeam_Player">
+            <End Role="Player" EntitySet="Player" />
+            <End Role="PlayerInTeam" EntitySet="PlayerInTeam" />
+          </AssociationSet>
+          <AssociationSet Name="FK_PlayerStatistic_Player" Association="Self.FK_PlayerStatistic_Player">
+            <End Role="Player" EntitySet="Player" />
+            <End Role="PlayerStatistic" EntitySet="PlayerStatistic" />
+          </AssociationSet>
+          <AssociationSet Name="FK_PlayerInTeam_Season" Association="Self.FK_PlayerInTeam_Season">
+            <End Role="Season" EntitySet="Season" />
+            <End Role="PlayerInTeam" EntitySet="PlayerInTeam" />
+          </AssociationSet>
+          <AssociationSet Name="FK_PlayerInTeam_Team" Association="Self.FK_PlayerInTeam_Team">
+            <End Role="Team" EntitySet="Team" />
+            <End Role="PlayerInTeam" EntitySet="PlayerInTeam" />
+          </AssociationSet>
+          <AssociationSet Name="FK_PlayerStatistic_Team" Association="Self.FK_PlayerStatistic_Team">
+            <End Role="Team" EntitySet="Team" />
+            <End Role="PlayerStatistic" EntitySet="PlayerStatistic" />
+          </AssociationSet>
+          <AssociationSet Name="FK_PostSeason_Season" Association="Self.FK_PostSeason_Season">
+            <End Role="Season" EntitySet="Season" />
+            <End Role="PostSeason" EntitySet="PostSeason" />
+          </AssociationSet>
+          <AssociationSet Name="FK_PostSeason_Team" Association="Self.FK_PostSeason_Team">
+            <End Role="Team" EntitySet="Team" />
+            <End Role="PostSeason" EntitySet="PostSeason" />
+          </AssociationSet>
+          <AssociationSet Name="FK_User_Role" Association="Self.FK_User_Role">
+            <End Role="Role" EntitySet="Role" />
+            <End Role="User" EntitySet="User" />
+          </AssociationSet>
+        </EntityContainer>
+      </Schema>
+    </edmx:ConceptualModels>
+    <!-- C-S mapping content -->
+    <edmx:Mappings>
+      <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
+        <EntityContainerMapping StorageEntityContainer="Хранилище PracticeNBAModelContainer" CdmEntityContainer="PracticeNBAEntities">
+          <EntitySetMapping Name="ActionType">
+            <EntityTypeMapping TypeName="PracticeNBAModel.ActionType">
+              <MappingFragment StoreEntitySet="ActionType">
+                <ScalarProperty Name="IdActionType" ColumnName="IdActionType" />
+                <ScalarProperty Name="NameActionType" ColumnName="NameActionType" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Conference">
+            <EntityTypeMapping TypeName="PracticeNBAModel.Conference">
+              <MappingFragment StoreEntitySet="Conference">
+                <ScalarProperty Name="IdConference" ColumnName="IdConference" />
+                <ScalarProperty Name="NameConference" ColumnName="NameConference" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Country">
+            <EntityTypeMapping TypeName="PracticeNBAModel.Country">
+              <MappingFragment StoreEntitySet="Country">
+                <ScalarProperty Name="IdCountry" ColumnName="IdCountry" />
+                <ScalarProperty Name="NameCountry" ColumnName="NameCountry" />
+                <ScalarProperty Name="CodeCountry" ColumnName="CodeCountry" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Department">
+            <EntityTypeMapping TypeName="PracticeNBAModel.Department">
+              <MappingFragment StoreEntitySet="Department">
+                <ScalarProperty Name="IdDepartment" ColumnName="IdDepartment" />
+                <ScalarProperty Name="NameDepartment" ColumnName="NameDepartment" />
+                <ScalarProperty Name="IdOrganization" ColumnName="IdOrganization" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Division">
+            <EntityTypeMapping TypeName="PracticeNBAModel.Division">
+              <MappingFragment StoreEntitySet="Division">
+                <ScalarProperty Name="IdDivision" ColumnName="IdDivision" />
+                <ScalarProperty Name="NameDivision" ColumnName="NameDivision" />
+                <ScalarProperty Name="IdConference" ColumnName="IdConference" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Gender">
+            <EntityTypeMapping TypeName="PracticeNBAModel.Gender">
+              <MappingFragment StoreEntitySet="Gender">
+                <ScalarProperty Name="IdGender" ColumnName="IdGender" />
+                <ScalarProperty Name="NameGender" ColumnName="NameGender" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Image">
+            <EntityTypeMapping TypeName="PracticeNBAModel.Image">
+              <MappingFragment StoreEntitySet="Image">
+                <ScalarProperty Name="IdImage" ColumnName="IdImage" />
+                <ScalarProperty Name="Image1" ColumnName="Image" />
+                <ScalarProperty Name="Description" ColumnName="Description" />
+                <ScalarProperty Name="NumberOfLikes" ColumnName="NumberOfLikes" />
+                <ScalarProperty Name="CreateTime" ColumnName="CreateTime" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Matchup">
+            <EntityTypeMapping TypeName="PracticeNBAModel.Matchup">
+              <MappingFragment StoreEntitySet="Matchup">
+                <ScalarProperty Name="IdMatchup" ColumnName="IdMatchup" />
+                <ScalarProperty Name="IdSeason" ColumnName="IdSeason" />
+                <ScalarProperty Name="IdMatchupType" ColumnName="IdMatchupType" />
+                <ScalarProperty Name="IdTeamAway" ColumnName="IdTeamAway" />
+                <ScalarProperty Name="IdTeamHome" ColumnName="IdTeamHome" />
+                <ScalarProperty Name="Starttime" ColumnName="Starttime" />
+                <ScalarProperty Name="TeamAwayScore" ColumnName="TeamAwayScore" />
+                <ScalarProperty Name="TeamHomeScore" ColumnName="TeamHomeScore" />
+                <ScalarProperty Name="Location" ColumnName="Location" />
+                <ScalarProperty Name="IdStatus" ColumnName="IdStatus" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="MatchupDetail">
+            <EntityTypeMapping TypeName="PracticeNBAModel.MatchupDetail">
+              <MappingFragment StoreEntitySet="MatchupDetail">
+                <ScalarProperty Name="IdMatchupDetail" ColumnName="IdMatchupDetail" />
+                <ScalarProperty Name="IdMatchup" ColumnName="IdMatchup" />
+                <ScalarProperty Name="IdQuarter" ColumnName="IdQuarter" />
+                <ScalarProperty Name="TeamAwayScore" ColumnName="TeamAwayScore" />
+                <ScalarProperty Name="TeamHomeScore" ColumnName="TeamHomeScore" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="MatchupLogs">
+            <EntityTypeMapping TypeName="PracticeNBAModel.MatchupLogs">
+              <MappingFragment StoreEntitySet="MatchupLogs">
+                <ScalarProperty Name="IdMatchupLogs" ColumnName="IdMatchupLogs" />
+                <ScalarProperty Name="IdMatchup" ColumnName="IdMatchup" />
+                <ScalarProperty Name="IdQuarter" ColumnName="IdQuarter" />
+                <ScalarProperty Name="OccurTime" ColumnName="OccurTime" />
+                <ScalarProperty Name="IdTeam" ColumnName="IdTeam" />
+                <ScalarProperty Name="IdPlayer" ColumnName="IdPlayer" />
+                <ScalarProperty Name="IdActionType" ColumnName="IdActionType" />
+                <ScalarProperty Name="Remark" ColumnName="Remark" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="MatchupType">
+            <EntityTypeMapping TypeName="PracticeNBAModel.MatchupType">
+              <MappingFragment StoreEntitySet="MatchupType">
+                <ScalarProperty Name="IdMatchupType" ColumnName="IdMatchupType" />
+                <ScalarProperty Name="NameMatchupType" ColumnName="NameMatchupType" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Organization">
+            <EntityTypeMapping TypeName="PracticeNBAModel.Organization">
+              <MappingFragment StoreEntitySet="Organization">
+                <ScalarProperty Name="IdOrganization" ColumnName="IdOrganization" />
+                <ScalarProperty Name="OrganizationName" ColumnName="OrganizationName" />
+                <ScalarProperty Name="Info" ColumnName="Info" />
+                <ScalarProperty Name="IdStatusOrganization" ColumnName="IdStatusOrganization" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Player">
+            <EntityTypeMapping TypeName="PracticeNBAModel.Player">
+              <MappingFragment StoreEntitySet="Player">
+                <ScalarProperty Name="IdPlayer" ColumnName="IdPlayer" />
+                <ScalarProperty Name="Surename" ColumnName="Surename" />
+                <ScalarProperty Name="Name" ColumnName="Name" />
+                <ScalarProperty Name="Patronymic" ColumnName="Patronymic" />
+                <ScalarProperty Name="IdPosition" ColumnName="IdPosition" />
+                <ScalarProperty Name="JoinYear" ColumnName="JoinYear" />
+                <ScalarProperty Name="IdGender" ColumnName="IdGender" />
+                <ScalarProperty Name="Height" ColumnName="Height" />
+                <ScalarProperty Name="Weight" ColumnName="Weight" />
+                <ScalarProperty Name="DateOfBirth" ColumnName="DateOfBirth" />
+                <ScalarProperty Name="College" ColumnName="College" />
+                <ScalarProperty Name="Email" ColumnName="Email" />
+                <ScalarProperty Name="IdCountry" ColumnName="IdCountry" />
+                <ScalarProperty Name="IsRetiment" ColumnName="IsRetiment" />
+                <ScalarProperty Name="RetirmentTime" ColumnName="RetirmentTime" />
+                <ScalarProperty Name="Image" ColumnName="Image" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="PlayerInTeam">
+            <EntityTypeMapping TypeName="PracticeNBAModel.PlayerInTeam">
+              <MappingFragment StoreEntitySet="PlayerInTeam">
+                <ScalarProperty Name="IdPlayerInTeam" ColumnName="IdPlayerInTeam" />
+                <ScalarProperty Name="IdPlayer" ColumnName="IdPlayer" />
+                <ScalarProperty Name="IdTeam" ColumnName="IdTeam" />
+                <ScalarProperty Name="IdSeason" ColumnName="IdSeason" />
+                <ScalarProperty Name="ShirtNumber" ColumnName="ShirtNumber" />
+                <ScalarProperty Name="Salary" ColumnName="Salary" />
+                <ScalarProperty Name="StarterIndex" ColumnName="StarterIndex" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="PlayerStatistic">
+            <EntityTypeMapping TypeName="PracticeNBAModel.PlayerStatistic">
+              <MappingFragment StoreEntitySet="PlayerStatistic">
+                <ScalarProperty Name="IdPlayerStatistic" ColumnName="IdPlayerStatistic" />
+                <ScalarProperty Name="IdMatchup" ColumnName="IdMatchup" />
+                <ScalarProperty Name="IdTeam" ColumnName="IdTeam" />
+                <ScalarProperty Name="IdPlayer" ColumnName="IdPlayer" />
+                <ScalarProperty Name="IsStarting" ColumnName="IsStarting" />
+                <ScalarProperty Name="Min" ColumnName="Min" />
+                <ScalarProperty Name="Point" ColumnName="Point" />
+                <ScalarProperty Name="Assist" ColumnName="Assist" />
+                <ScalarProperty Name="FieldGoalMade" ColumnName="FieldGoalMade" />
+                <ScalarProperty Name="FieldGoalMissed" ColumnName="FieldGoalMissed" />
+                <ScalarProperty Name="ThreePointFieldGoalMade" ColumnName="ThreePointFieldGoalMade" />
+                <ScalarProperty Name="ThreePointFieldGoalMissed" ColumnName="ThreePointFieldGoalMissed" />
+                <ScalarProperty Name="FreeThrowMade" ColumnName="FreeThrowMade" />
+                <ScalarProperty Name="FreeThrowMissed" ColumnName="FreeThrowMissed" />
+                <ScalarProperty Name="Rebound" ColumnName="Rebound" />
+                <ScalarProperty Name="OFFR" ColumnName="OFFR" />
+                <ScalarProperty Name="DFFR" ColumnName="DFFR" />
+                <ScalarProperty Name="Steal" ColumnName="Steal" />
+                <ScalarProperty Name="Block" ColumnName="Block" />
+                <ScalarProperty Name="Turnover" ColumnName="Turnover" />
+                <ScalarProperty Name="Foul" ColumnName="Foul" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Position">
+            <EntityTypeMapping TypeName="PracticeNBAModel.Position">
+              <MappingFragment StoreEntitySet="Position">
+                <ScalarProperty Name="IdPosition" ColumnName="IdPosition" />
+                <ScalarProperty Name="NamePosition" ColumnName="NamePosition" />
+                <ScalarProperty Name="Abbr" ColumnName="Abbr" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="PostSeason">
+            <EntityTypeMapping TypeName="PracticeNBAModel.PostSeason">
+              <MappingFragment StoreEntitySet="PostSeason">
+                <ScalarProperty Name="IdPostSeason" ColumnName="IdPostSeason" />
+                <ScalarProperty Name="IdSeason" ColumnName="IdSeason" />
+                <ScalarProperty Name="IdTeam" ColumnName="IdTeam" />
+                <ScalarProperty Name="Rank" ColumnName="Rank" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Quarter">
+            <EntityTypeMapping TypeName="PracticeNBAModel.Quarter">
+              <MappingFragment StoreEntitySet="Quarter">
+                <ScalarProperty Name="IdQuarter" ColumnName="IdQuarter" />
+                <ScalarProperty Name="NameQuarter" ColumnName="NameQuarter" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Role">
+            <EntityTypeMapping TypeName="PracticeNBAModel.Role">
+              <MappingFragment StoreEntitySet="Role">
+                <ScalarProperty Name="IdRole" ColumnName="IdRole" />
+                <ScalarProperty Name="RoleName" ColumnName="RoleName" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Season">
+            <EntityTypeMapping TypeName="PracticeNBAModel.Season">
+              <MappingFragment StoreEntitySet="Season">
+                <ScalarProperty Name="IdSeason" ColumnName="IdSeason" />
+                <ScalarProperty Name="NameSeason" ColumnName="NameSeason" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Status">
+            <EntityTypeMapping TypeName="PracticeNBAModel.Status">
+              <MappingFragment StoreEntitySet="Status">
+                <ScalarProperty Name="IdStatus" ColumnName="IdStatus" />
+                <ScalarProperty Name="NameStatus" ColumnName="NameStatus" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="StatusOrganization">
+            <EntityTypeMapping TypeName="PracticeNBAModel.StatusOrganization">
+              <MappingFragment StoreEntitySet="StatusOrganization">
+                <ScalarProperty Name="IdStatusOrganization" ColumnName="IdStatusOrganization" />
+                <ScalarProperty Name="NameStatusOrganization" ColumnName="NameStatusOrganization" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="sysdiagrams">
+            <EntityTypeMapping TypeName="PracticeNBAModel.sysdiagrams">
+              <MappingFragment StoreEntitySet="sysdiagrams">
+                <ScalarProperty Name="name" ColumnName="name" />
+                <ScalarProperty Name="principal_id" ColumnName="principal_id" />
+                <ScalarProperty Name="diagram_id" ColumnName="diagram_id" />
+                <ScalarProperty Name="version" ColumnName="version" />
+                <ScalarProperty Name="definition" ColumnName="definition" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Team">
+            <EntityTypeMapping TypeName="PracticeNBAModel.Team">
+              <MappingFragment StoreEntitySet="Team">
+                <ScalarProperty Name="IdTeam" ColumnName="IdTeam" />
+                <ScalarProperty Name="TeamName" ColumnName="TeamName" />
+                <ScalarProperty Name="IdDivision" ColumnName="IdDivision" />
+                <ScalarProperty Name="Couch" ColumnName="Couch" />
+                <ScalarProperty Name="Abbr" ColumnName="Abbr" />
+                <ScalarProperty Name="Stadium" ColumnName="Stadium" />
+                <ScalarProperty Name="Logo" ColumnName="Logo" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="User">
+            <EntityTypeMapping TypeName="PracticeNBAModel.User">
+              <MappingFragment StoreEntitySet="User">
+                <ScalarProperty Name="IdUser" ColumnName="IdUser" />
+                <ScalarProperty Name="Surename" ColumnName="Surename" />
+                <ScalarProperty Name="Name" ColumnName="Name" />
+                <ScalarProperty Name="Patronymic" ColumnName="Patronymic" />
+                <ScalarProperty Name="LoginName" ColumnName="LoginName" />
+                <ScalarProperty Name="Password" ColumnName="Password" />
+                <ScalarProperty Name="IdGender" ColumnName="IdGender" />
+                <ScalarProperty Name="DateOfBirth" ColumnName="DateOfBirth" />
+                <ScalarProperty Name="Phone" ColumnName="Phone" />
+                <ScalarProperty Name="Email" ColumnName="Email" />
+                <ScalarProperty Name="IdRole" ColumnName="IdRole" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+        </EntityContainerMapping>
+      </Mapping>
+    </edmx:Mappings>
+  </edmx:Runtime>
+  <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
+  <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
+    <Connection>
+      <DesignerInfoPropertySet>
+        <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
+      </DesignerInfoPropertySet>
+    </Connection>
+    <Options>
+      <DesignerInfoPropertySet>
+        <DesignerProperty Name="ValidateOnBuild" Value="true" />
+        <DesignerProperty Name="EnablePluralization" Value="false" />
+        <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
+        <DesignerProperty Name="UseLegacyProvider" Value="false" />
+        <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
+      </DesignerInfoPropertySet>
+    </Options>
+    <!-- Diagram content (shape and connector positions) -->
+    <Diagrams></Diagrams>
+  </Designer>
+</edmx:Edmx>

+ 64 - 0
NBAManagment/Entities/NBAshka.edmx.diagram

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
+ <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
+  <edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
+    <!-- Diagram content (shape and connector positions) -->
+    <edmx:Diagrams>
+      <Diagram DiagramId="a68e7452841747d49c682e47c2c6fd65" Name="Diagram1" ZoomLevel="69">
+        <EntityTypeShape EntityType="PracticeNBAModel.ActionType" Width="1.5" PointX="7.5" PointY="19.75" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.Conference" Width="1.5" PointX="0.75" PointY="12.75" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.Country" Width="1.5" PointX="6" PointY="5.125" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.Department" Width="1.5" PointX="17.25" PointY="6.125" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.Division" Width="1.5" PointX="3" PointY="12.5" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.Gender" Width="1.5" PointX="6" PointY="1.625" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.Image" Width="1.5" PointX="0.75" PointY="2.75" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.Matchup" Width="1.5" PointX="7.5" PointY="11.375" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.MatchupDetail" Width="1.5" PointX="12.75" PointY="12.375" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.MatchupLogs" Width="1.5" PointX="9.75" PointY="15.75" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.MatchupType" Width="1.5" PointX="5.25" PointY="20.625" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.Organization" Width="1.5" PointX="15" PointY="6" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.Player" Width="1.5" PointX="8.25" PointY="0.875" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.PlayerInTeam" Width="1.5" PointX="10.5" PointY="12.125" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.PlayerStatistic" Width="1.5" PointX="10.5" PointY="5.875" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.Position" Width="1.5" PointX="6" PointY="17.125" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.PostSeason" Width="1.5" PointX="7.5" PointY="8.5" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.Quarter" Width="1.5" PointX="10.5" PointY="20.625" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.Role" Width="1.5" PointX="9" PointY="23.875" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.Season" Width="1.5" PointX="5.25" PointY="8.5" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.Status" Width="1.5" PointX="5.25" PointY="22.875" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.StatusOrganization" Width="1.5" PointX="12.75" PointY="6.25" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.sysdiagrams" Width="1.5" PointX="2.75" PointY="2.75" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.Team" Width="1.5" PointX="5.25" PointY="11.625" IsExpanded="true" />
+        <EntityTypeShape EntityType="PracticeNBAModel.User" Width="1.5" PointX="11.25" PointY="0.75" IsExpanded="true" />
+        <AssociationConnector Association="PracticeNBAModel.FK_MatchupLogs_ActionType" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_Division_Conference" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_Player_Country" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_Department_Organization" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_Team_Division" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_Player_Gender" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_User_Gender" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_Matchup_MatchupType" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_Matchup_Season" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_Matchup_Status" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_Matchup_Team" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_Matchup_Team1" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_MatchupDetail_Matchup" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_MatchupLogs_Matchup" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_MatchupDetail_Quarter" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_MatchupLogs_Player" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_MatchupLogs_Quarter" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_MatchupLogs_Team" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_Organization_StatusOrganization" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_Player_Position" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_PlayerInTeam_Player" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_PlayerStatistic_Player" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_PlayerInTeam_Season" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_PlayerInTeam_Team" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_PlayerStatistic_Team" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_PostSeason_Season" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_PostSeason_Team" ManuallyRouted="false" />
+        <AssociationConnector Association="PracticeNBAModel.FK_User_Role" ManuallyRouted="false" />
+      </Diagram>
+    </edmx:Diagrams>
+  </edmx:Designer>
+</edmx:Edmx>

+ 733 - 0
NBAManagment/Entities/NBAshka.tt

@@ -0,0 +1,733 @@
+<#@ template language="C#" debug="false" hostspecific="true"#>
+<#@ include file="EF6.Utility.CS.ttinclude"#><#@ 
+ output extension=".cs"#><#
+
+const string inputFile = @"NBAshka.edmx";
+var textTransform = DynamicTextTransformation.Create(this);
+var code = new CodeGenerationTools(this);
+var ef = new MetadataTools(this);
+var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
+var	fileManager = EntityFrameworkTemplateFileManager.Create(this);
+var itemCollection = new EdmMetadataLoader(textTransform.Host, textTransform.Errors).CreateEdmItemCollection(inputFile);
+var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
+
+if (!typeMapper.VerifyCaseInsensitiveTypeUniqueness(typeMapper.GetAllGlobalItems(itemCollection), inputFile))
+{
+    return string.Empty;
+}
+
+WriteHeader(codeStringGenerator, fileManager);
+
+foreach (var entity in typeMapper.GetItemsToGenerate<EntityType>(itemCollection))
+{
+    fileManager.StartNewFile(entity.Name + ".cs");
+    BeginNamespace(code);
+#>
+<#=codeStringGenerator.UsingDirectives(inHeader: false)#>
+<#=codeStringGenerator.EntityClassOpening(entity)#>
+{
+<#
+    var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(entity);
+    var collectionNavigationProperties = typeMapper.GetCollectionNavigationProperties(entity);
+    var complexProperties = typeMapper.GetComplexProperties(entity);
+
+    if (propertiesWithDefaultValues.Any() || collectionNavigationProperties.Any() || complexProperties.Any())
+    {
+#>
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public <#=code.Escape(entity)#>()
+    {
+<#
+        foreach (var edmProperty in propertiesWithDefaultValues)
+        {
+#>
+        this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
+<#
+        }
+
+        foreach (var navigationProperty in collectionNavigationProperties)
+        {
+#>
+        this.<#=code.Escape(navigationProperty)#> = new HashSet<<#=typeMapper.GetTypeName(navigationProperty.ToEndMember.GetEntityType())#>>();
+<#
+        }
+
+        foreach (var complexProperty in complexProperties)
+        {
+#>
+        this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
+<#
+        }
+#>
+    }
+
+<#
+    }
+
+    var simpleProperties = typeMapper.GetSimpleProperties(entity);
+    if (simpleProperties.Any())
+    {
+        foreach (var edmProperty in simpleProperties)
+        {
+#>
+    <#=codeStringGenerator.Property(edmProperty)#>
+<#
+        }
+    }
+
+    if (complexProperties.Any())
+    {
+#>
+
+<#
+        foreach(var complexProperty in complexProperties)
+        {
+#>
+    <#=codeStringGenerator.Property(complexProperty)#>
+<#
+        }
+    }
+
+    var navigationProperties = typeMapper.GetNavigationProperties(entity);
+    if (navigationProperties.Any())
+    {
+#>
+
+<#
+        foreach (var navigationProperty in navigationProperties)
+        {
+            if (navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
+            {
+#>
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+<#
+            }
+#>
+    <#=codeStringGenerator.NavigationProperty(navigationProperty)#>
+<#
+        }
+    }
+#>
+}
+<#
+    EndNamespace(code);
+}
+
+foreach (var complex in typeMapper.GetItemsToGenerate<ComplexType>(itemCollection))
+{
+    fileManager.StartNewFile(complex.Name + ".cs");
+    BeginNamespace(code);
+#>
+<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
+<#=Accessibility.ForType(complex)#> partial class <#=code.Escape(complex)#>
+{
+<#
+    var complexProperties = typeMapper.GetComplexProperties(complex);
+    var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(complex);
+
+    if (propertiesWithDefaultValues.Any() || complexProperties.Any())
+    {
+#>
+    public <#=code.Escape(complex)#>()
+    {
+<#
+        foreach (var edmProperty in propertiesWithDefaultValues)
+        {
+#>
+        this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
+<#
+        }
+
+        foreach (var complexProperty in complexProperties)
+        {
+#>
+        this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
+<#
+        }
+#>
+    }
+
+<#
+    }
+
+    var simpleProperties = typeMapper.GetSimpleProperties(complex);
+    if (simpleProperties.Any())
+    {
+        foreach(var edmProperty in simpleProperties)
+        {
+#>
+    <#=codeStringGenerator.Property(edmProperty)#>
+<#
+        }
+    }
+
+    if (complexProperties.Any())
+    {
+#>
+
+<#
+        foreach(var edmProperty in complexProperties)
+        {
+#>
+    <#=codeStringGenerator.Property(edmProperty)#>
+<#
+        }
+    }
+#>
+}
+<#
+    EndNamespace(code);
+}
+
+foreach (var enumType in typeMapper.GetEnumItemsToGenerate(itemCollection))
+{
+    fileManager.StartNewFile(enumType.Name + ".cs");
+    BeginNamespace(code);
+#>
+<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
+<#
+    if (typeMapper.EnumIsFlags(enumType))
+    {
+#>
+[Flags]
+<#
+    }
+#>
+<#=codeStringGenerator.EnumOpening(enumType)#>
+{
+<#
+    var foundOne = false;
+    
+    foreach (MetadataItem member in typeMapper.GetEnumMembers(enumType))
+    {
+        foundOne = true;
+#>
+    <#=code.Escape(typeMapper.GetEnumMemberName(member))#> = <#=typeMapper.GetEnumMemberValue(member)#>,
+<#
+    }
+
+    if (foundOne)
+    {
+        this.GenerationEnvironment.Remove(this.GenerationEnvironment.Length - 3, 1);
+    }
+#>
+}
+<#
+    EndNamespace(code);
+}
+
+fileManager.Process();
+
+#>
+<#+
+
+public void WriteHeader(CodeStringGenerator codeStringGenerator, EntityFrameworkTemplateFileManager fileManager)
+{
+    fileManager.StartHeader();
+#>
+//------------------------------------------------------------------------------
+// <auto-generated>
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
+//
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
+// </auto-generated>
+//------------------------------------------------------------------------------
+<#=codeStringGenerator.UsingDirectives(inHeader: true)#>
+<#+
+    fileManager.EndBlock();
+}
+
+public void BeginNamespace(CodeGenerationTools code)
+{
+    var codeNamespace = code.VsNamespaceSuggestion();
+    if (!String.IsNullOrEmpty(codeNamespace))
+    {
+#>
+namespace <#=code.EscapeNamespace(codeNamespace)#>
+{
+<#+
+        PushIndent("    ");
+    }
+}
+
+public void EndNamespace(CodeGenerationTools code)
+{
+    if (!String.IsNullOrEmpty(code.VsNamespaceSuggestion()))
+    {
+        PopIndent();
+#>
+}
+<#+
+    }
+}
+
+public const string TemplateId = "CSharp_DbContext_Types_EF6";
+
+public class CodeStringGenerator
+{
+    private readonly CodeGenerationTools _code;
+    private readonly TypeMapper _typeMapper;
+    private readonly MetadataTools _ef;
+
+    public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
+    {
+        ArgumentNotNull(code, "code");
+        ArgumentNotNull(typeMapper, "typeMapper");
+        ArgumentNotNull(ef, "ef");
+
+        _code = code;
+        _typeMapper = typeMapper;
+        _ef = ef;
+    }
+
+    public string Property(EdmProperty edmProperty)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} {1} {2} {{ {3}get; {4}set; }}",
+            Accessibility.ForProperty(edmProperty),
+            _typeMapper.GetTypeName(edmProperty.TypeUsage),
+            _code.Escape(edmProperty),
+            _code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
+            _code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
+    }
+
+    public string NavigationProperty(NavigationProperty navProp)
+    {
+        var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} {1} {2} {{ {3}get; {4}set; }}",
+            AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
+            navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
+            _code.Escape(navProp),
+            _code.SpaceAfter(Accessibility.ForGetter(navProp)),
+            _code.SpaceAfter(Accessibility.ForSetter(navProp)));
+    }
+    
+    public string AccessibilityAndVirtual(string accessibility)
+    {
+        return accessibility + (accessibility != "private" ? " virtual" : "");
+    }
+    
+    public string EntityClassOpening(EntityType entity)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} {1}partial class {2}{3}",
+            Accessibility.ForType(entity),
+            _code.SpaceAfter(_code.AbstractOption(entity)),
+            _code.Escape(entity),
+            _code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
+    }
+    
+    public string EnumOpening(SimpleType enumType)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} enum {1} : {2}",
+            Accessibility.ForType(enumType),
+            _code.Escape(enumType),
+            _code.Escape(_typeMapper.UnderlyingClrType(enumType)));
+        }
+    
+    public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
+    {
+        var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
+        foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
+        {
+            var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
+            var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
+            var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
+            writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
+        }
+    }
+    
+    public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
+    {
+        var parameters = _typeMapper.GetParameters(edmFunction);
+        
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} IQueryable<{1}> {2}({3})",
+            AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
+            _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
+            _code.Escape(edmFunction),
+            string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
+    }
+    
+    public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
+    {
+        var parameters = _typeMapper.GetParameters(edmFunction);
+        
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
+            _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
+            edmFunction.NamespaceName,
+            edmFunction.Name,
+            string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
+            _code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
+    }
+    
+    public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+    {
+        var parameters = _typeMapper.GetParameters(edmFunction);
+        var returnType = _typeMapper.GetReturnType(edmFunction);
+
+        var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
+        if (includeMergeOption)
+        {
+            paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
+        }
+
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} {1} {2}({3})",
+            AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
+            returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
+            _code.Escape(edmFunction),
+            paramList);
+    }
+    
+    public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+    {
+        var parameters = _typeMapper.GetParameters(edmFunction);
+        var returnType = _typeMapper.GetReturnType(edmFunction);
+
+        var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
+        if (includeMergeOption)
+        {
+            callParams = ", mergeOption" + callParams;
+        }
+        
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
+            returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
+            edmFunction.Name,
+            callParams);
+    }
+    
+    public string DbSet(EntitySet entitySet)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} virtual DbSet<{1}> {2} {{ get; set; }}",
+            Accessibility.ForReadOnlyProperty(entitySet),
+            _typeMapper.GetTypeName(entitySet.ElementType),
+            _code.Escape(entitySet));
+    }
+
+    public string UsingDirectives(bool inHeader, bool includeCollections = true)
+    {
+        return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
+            ? string.Format(
+                CultureInfo.InvariantCulture,
+                "{0}using System;{1}" +
+                "{2}",
+                inHeader ? Environment.NewLine : "",
+                includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
+                inHeader ? "" : Environment.NewLine)
+            : "";
+    }
+}
+
+public class TypeMapper
+{
+    private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
+
+    private readonly System.Collections.IList _errors;
+    private readonly CodeGenerationTools _code;
+    private readonly MetadataTools _ef;
+
+    public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
+    {
+        ArgumentNotNull(code, "code");
+        ArgumentNotNull(ef, "ef");
+        ArgumentNotNull(errors, "errors");
+
+        _code = code;
+        _ef = ef;
+        _errors = errors;
+    }
+
+    public static string FixNamespaces(string typeName)
+    {
+        return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
+    }
+
+    public string GetTypeName(TypeUsage typeUsage)
+    {
+        return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
+    }
+
+    public string GetTypeName(EdmType edmType)
+    {
+        return GetTypeName(edmType, isNullable: null, modelNamespace: null);
+    }
+
+    public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
+    {
+        return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
+    }
+
+    public string GetTypeName(EdmType edmType, string modelNamespace)
+    {
+        return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
+    }
+
+    public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
+    {
+        if (edmType == null)
+        {
+            return null;
+        }
+
+        var collectionType = edmType as CollectionType;
+        if (collectionType != null)
+        {
+            return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
+        }
+
+        var typeName = _code.Escape(edmType.MetadataProperties
+                                .Where(p => p.Name == ExternalTypeNameAttributeName)
+                                .Select(p => (string)p.Value)
+                                .FirstOrDefault())
+            ?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
+                _code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
+                _code.Escape(edmType));
+
+        if (edmType is StructuralType)
+        {
+            return typeName;
+        }
+
+        if (edmType is SimpleType)
+        {
+            var clrType = UnderlyingClrType(edmType);
+            if (!IsEnumType(edmType))
+            {
+                typeName = _code.Escape(clrType);
+            }
+
+            typeName = FixNamespaces(typeName);
+
+            return clrType.IsValueType && isNullable == true ?
+                String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
+                typeName;
+        }
+
+        throw new ArgumentException("edmType");
+    }
+    
+    public Type UnderlyingClrType(EdmType edmType)
+    {
+        ArgumentNotNull(edmType, "edmType");
+
+        var primitiveType = edmType as PrimitiveType;
+        if (primitiveType != null)
+        {
+            return primitiveType.ClrEquivalentType;
+        }
+
+        if (IsEnumType(edmType))
+        {
+            return GetEnumUnderlyingType(edmType).ClrEquivalentType;
+        }
+
+        return typeof(object);
+    }
+    
+    public object GetEnumMemberValue(MetadataItem enumMember)
+    {
+        ArgumentNotNull(enumMember, "enumMember");
+        
+        var valueProperty = enumMember.GetType().GetProperty("Value");
+        return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
+    }
+    
+    public string GetEnumMemberName(MetadataItem enumMember)
+    {
+        ArgumentNotNull(enumMember, "enumMember");
+        
+        var nameProperty = enumMember.GetType().GetProperty("Name");
+        return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
+    }
+
+    public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
+    {
+        ArgumentNotNull(enumType, "enumType");
+
+        var membersProperty = enumType.GetType().GetProperty("Members");
+        return membersProperty != null 
+            ? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
+            : Enumerable.Empty<MetadataItem>();
+    }
+    
+    public bool EnumIsFlags(EdmType enumType)
+    {
+        ArgumentNotNull(enumType, "enumType");
+        
+        var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
+        return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
+    }
+
+    public bool IsEnumType(GlobalItem edmType)
+    {
+        ArgumentNotNull(edmType, "edmType");
+
+        return edmType.GetType().Name == "EnumType";
+    }
+
+    public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
+    {
+        ArgumentNotNull(enumType, "enumType");
+
+        return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
+    }
+
+    public string CreateLiteral(object value)
+    {
+        if (value == null || value.GetType() != typeof(TimeSpan))
+        {
+            return _code.CreateLiteral(value);
+        }
+
+        return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
+    }
+    
+    public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
+    {
+        ArgumentNotNull(types, "types");
+        ArgumentNotNull(sourceFile, "sourceFile");
+        
+        var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
+        if (types.Any(item => !hash.Add(item)))
+        {
+            _errors.Add(
+                new CompilerError(sourceFile, -1, -1, "6023",
+                    String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
+            return false;
+        }
+        return true;
+    }
+    
+    public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
+    {
+        return GetItemsToGenerate<SimpleType>(itemCollection)
+            .Where(e => IsEnumType(e));
+    }
+    
+    public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
+    {
+        return itemCollection
+            .OfType<T>()
+            .Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
+            .OrderBy(i => i.Name);
+    }
+
+    public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
+    {
+        return itemCollection
+            .Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
+            .Select(g => GetGlobalItemName(g));
+    }
+
+    public string GetGlobalItemName(GlobalItem item)
+    {
+        if (item is EdmType)
+        {
+            return ((EdmType)item).Name;
+        }
+        else
+        {
+            return ((EntityContainer)item).Name;
+        }
+    }
+
+    public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
+    }
+    
+    public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
+    }
+    
+    public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
+    }
+    
+    public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
+    }
+
+    public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
+    }
+    
+    public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
+    }
+
+    public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
+    {
+        return type.NavigationProperties.Where(np => np.DeclaringType == type);
+    }
+    
+    public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
+    {
+        return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
+    }
+    
+    public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
+    {
+        ArgumentNotNull(edmFunction, "edmFunction");
+
+        var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
+        return returnParamsProperty == null
+            ? edmFunction.ReturnParameter
+            : ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
+    }
+
+    public bool IsComposable(EdmFunction edmFunction)
+    {
+        ArgumentNotNull(edmFunction, "edmFunction");
+
+        var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
+        return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
+    }
+
+    public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
+    {
+        return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
+    }
+
+    public TypeUsage GetReturnType(EdmFunction edmFunction)
+    {
+        var returnParam = GetReturnParameter(edmFunction);
+        return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
+    }
+    
+    public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
+    {
+        var returnType = GetReturnType(edmFunction);
+        return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
+    }
+}
+
+public static void ArgumentNotNull<T>(T arg, string name) where T : class
+{
+    if (arg == null)
+    {
+        throw new ArgumentNullException(name);
+    }
+}
+#>

+ 48 - 0
NBAManagment/Entities/Organization.cs

@@ -0,0 +1,48 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class Organization
+{
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public Organization()
+    {
+
+        this.Department = new HashSet<Department>();
+
+    }
+
+
+    public int IdOrganization { get; set; }
+
+    public string OrganizationName { get; set; }
+
+    public string Info { get; set; }
+
+    public Nullable<int> IdStatusOrganization { get; set; }
+
+
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<Department> Department { get; set; }
+
+    public virtual StatusOrganization StatusOrganization { get; set; }
+
+}
+
+}

+ 88 - 0
NBAManagment/Entities/Player.cs

@@ -0,0 +1,88 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class Player
+{
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public Player()
+    {
+
+        this.MatchupLogs = new HashSet<MatchupLogs>();
+
+        this.PlayerInTeam = new HashSet<PlayerInTeam>();
+
+        this.PlayerStatistic = new HashSet<PlayerStatistic>();
+
+    }
+
+
+    public int IdPlayer { get; set; }
+
+    public string Surename { get; set; }
+
+    public string Name { get; set; }
+
+    public string Patronymic { get; set; }
+
+    public Nullable<int> IdPosition { get; set; }
+
+    public Nullable<System.DateTime> JoinYear { get; set; }
+
+    public Nullable<int> IdGender { get; set; }
+
+    public Nullable<decimal> Height { get; set; }
+
+    public Nullable<decimal> Weight { get; set; }
+
+    public Nullable<System.DateTime> DateOfBirth { get; set; }
+
+    public string College { get; set; }
+
+    public string Email { get; set; }
+
+    public Nullable<int> IdCountry { get; set; }
+
+    public Nullable<bool> IsRetiment { get; set; }
+
+    public Nullable<System.DateTime> RetirmentTime { get; set; }
+
+    public byte[] Image { get; set; }
+
+
+
+    public virtual Country Country { get; set; }
+
+    public virtual Gender Gender { get; set; }
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<MatchupLogs> MatchupLogs { get; set; }
+
+    public virtual Position Position { get; set; }
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<PlayerInTeam> PlayerInTeam { get; set; }
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<PlayerStatistic> PlayerStatistic { get; set; }
+
+}
+
+}

+ 45 - 0
NBAManagment/Entities/PlayerInTeam.cs

@@ -0,0 +1,45 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class PlayerInTeam
+{
+
+    public int IdPlayerInTeam { get; set; }
+
+    public Nullable<int> IdPlayer { get; set; }
+
+    public Nullable<int> IdTeam { get; set; }
+
+    public Nullable<int> IdSeason { get; set; }
+
+    public string ShirtNumber { get; set; }
+
+    public Nullable<decimal> Salary { get; set; }
+
+    public Nullable<int> StarterIndex { get; set; }
+
+
+
+    public virtual Player Player { get; set; }
+
+    public virtual Season Season { get; set; }
+
+    public virtual Team Team { get; set; }
+
+}
+
+}

+ 71 - 0
NBAManagment/Entities/PlayerStatistic.cs

@@ -0,0 +1,71 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class PlayerStatistic
+{
+
+    public int IdPlayerStatistic { get; set; }
+
+    public Nullable<int> IdMatchup { get; set; }
+
+    public Nullable<int> IdTeam { get; set; }
+
+    public Nullable<int> IdPlayer { get; set; }
+
+    public Nullable<int> IsStarting { get; set; }
+
+    public Nullable<decimal> Min { get; set; }
+
+    public Nullable<int> Point { get; set; }
+
+    public Nullable<int> Assist { get; set; }
+
+    public Nullable<int> FieldGoalMade { get; set; }
+
+    public Nullable<int> FieldGoalMissed { get; set; }
+
+    public Nullable<int> ThreePointFieldGoalMade { get; set; }
+
+    public Nullable<int> ThreePointFieldGoalMissed { get; set; }
+
+    public Nullable<int> FreeThrowMade { get; set; }
+
+    public Nullable<int> FreeThrowMissed { get; set; }
+
+    public Nullable<int> Rebound { get; set; }
+
+    public Nullable<int> OFFR { get; set; }
+
+    public Nullable<int> DFFR { get; set; }
+
+    public Nullable<int> Steal { get; set; }
+
+    public Nullable<int> Block { get; set; }
+
+    public Nullable<int> Turnover { get; set; }
+
+    public Nullable<int> Foul { get; set; }
+
+
+
+    public virtual Player Player { get; set; }
+
+    public virtual Team Team { get; set; }
+
+}
+
+}

+ 44 - 0
NBAManagment/Entities/Position.cs

@@ -0,0 +1,44 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class Position
+{
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public Position()
+    {
+
+        this.Player = new HashSet<Player>();
+
+    }
+
+
+    public int IdPosition { get; set; }
+
+    public string NamePosition { get; set; }
+
+    public string Abbr { get; set; }
+
+
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<Player> Player { get; set; }
+
+}
+
+}

+ 37 - 0
NBAManagment/Entities/PostSeason.cs

@@ -0,0 +1,37 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class PostSeason
+{
+
+    public int IdPostSeason { get; set; }
+
+    public Nullable<int> IdSeason { get; set; }
+
+    public Nullable<int> IdTeam { get; set; }
+
+    public Nullable<int> Rank { get; set; }
+
+
+
+    public virtual Season Season { get; set; }
+
+    public virtual Team Team { get; set; }
+
+}
+
+}

+ 48 - 0
NBAManagment/Entities/Quarter.cs

@@ -0,0 +1,48 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class Quarter
+{
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public Quarter()
+    {
+
+        this.MatchupDetail = new HashSet<MatchupDetail>();
+
+        this.MatchupLogs = new HashSet<MatchupLogs>();
+
+    }
+
+
+    public int IdQuarter { get; set; }
+
+    public string NameQuarter { get; set; }
+
+
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<MatchupDetail> MatchupDetail { get; set; }
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<MatchupLogs> MatchupLogs { get; set; }
+
+}
+
+}

+ 42 - 0
NBAManagment/Entities/Role.cs

@@ -0,0 +1,42 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class Role
+{
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public Role()
+    {
+
+        this.User = new HashSet<User>();
+
+    }
+
+
+    public int IdRole { get; set; }
+
+    public string RoleName { get; set; }
+
+
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<User> User { get; set; }
+
+}
+
+}

+ 54 - 0
NBAManagment/Entities/Season.cs

@@ -0,0 +1,54 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class Season
+{
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public Season()
+    {
+
+        this.Matchup = new HashSet<Matchup>();
+
+        this.PlayerInTeam = new HashSet<PlayerInTeam>();
+
+        this.PostSeason = new HashSet<PostSeason>();
+
+    }
+
+
+    public int IdSeason { get; set; }
+
+    public string NameSeason { get; set; }
+
+
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<Matchup> Matchup { get; set; }
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<PlayerInTeam> PlayerInTeam { get; set; }
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<PostSeason> PostSeason { get; set; }
+
+}
+
+}

+ 42 - 0
NBAManagment/Entities/Status.cs

@@ -0,0 +1,42 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class Status
+{
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public Status()
+    {
+
+        this.Matchup = new HashSet<Matchup>();
+
+    }
+
+
+    public int IdStatus { get; set; }
+
+    public string NameStatus { get; set; }
+
+
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<Matchup> Matchup { get; set; }
+
+}
+
+}

+ 42 - 0
NBAManagment/Entities/StatusOrganization.cs

@@ -0,0 +1,42 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class StatusOrganization
+{
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public StatusOrganization()
+    {
+
+        this.Organization = new HashSet<Organization>();
+
+    }
+
+
+    public int IdStatusOrganization { get; set; }
+
+    public string NameStatusOrganization { get; set; }
+
+
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<Organization> Organization { get; set; }
+
+}
+
+}

+ 84 - 0
NBAManagment/Entities/Team.cs

@@ -0,0 +1,84 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class Team
+{
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+    public Team()
+    {
+
+        this.Matchup = new HashSet<Matchup>();
+
+        this.Matchup1 = new HashSet<Matchup>();
+
+        this.MatchupLogs = new HashSet<MatchupLogs>();
+
+        this.PlayerInTeam = new HashSet<PlayerInTeam>();
+
+        this.PlayerStatistic = new HashSet<PlayerStatistic>();
+
+        this.PostSeason = new HashSet<PostSeason>();
+
+    }
+
+
+    public int IdTeam { get; set; }
+
+    public string TeamName { get; set; }
+
+    public Nullable<int> IdDivision { get; set; }
+
+    public string Couch { get; set; }
+
+    public string Abbr { get; set; }
+
+    public string Stadium { get; set; }
+
+    public byte[] Logo { get; set; }
+
+
+
+    public virtual Division Division { get; set; }
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<Matchup> Matchup { get; set; }
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<Matchup> Matchup1 { get; set; }
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<MatchupLogs> MatchupLogs { get; set; }
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<PlayerInTeam> PlayerInTeam { get; set; }
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<PlayerStatistic> PlayerStatistic { get; set; }
+
+    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+
+    public virtual ICollection<PostSeason> PostSeason { get; set; }
+
+}
+
+}

+ 51 - 0
NBAManagment/Entities/User.cs

@@ -0,0 +1,51 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class User
+{
+
+    public int IdUser { get; set; }
+
+    public string Surename { get; set; }
+
+    public string Name { get; set; }
+
+    public string Patronymic { get; set; }
+
+    public string LoginName { get; set; }
+
+    public string Password { get; set; }
+
+    public Nullable<int> IdGender { get; set; }
+
+    public Nullable<System.DateTime> DateOfBirth { get; set; }
+
+    public string Phone { get; set; }
+
+    public string Email { get; set; }
+
+    public Nullable<int> IdRole { get; set; }
+
+
+
+    public virtual Gender Gender { get; set; }
+
+    public virtual Role Role { get; set; }
+
+}
+
+}

+ 33 - 0
NBAManagment/Entities/sysdiagrams.cs

@@ -0,0 +1,33 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace NBAManagment.Entities
+{
+
+using System;
+    using System.Collections.Generic;
+    
+public partial class sysdiagrams
+{
+
+    public string name { get; set; }
+
+    public int principal_id { get; set; }
+
+    public int diagram_id { get; set; }
+
+    public Nullable<int> version { get; set; }
+
+    public byte[] definition { get; set; }
+
+}
+
+}

+ 13 - 0
NBAManagment/Filter/IFilter.cs

@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace NBAManagment.Filter
+{
+    public interface IFilter<T>
+    {
+        IEnumerable<T> Use(IEnumerable<T> collection);
+    }
+}

+ 14 - 0
NBAManagment/Filter/IFilteredEnumerable.cs

@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace NBAManagment.Filter
+{
+    interface IFilteredEnumerable<T> : IEnumerable<T>
+    {
+        IEnumerable<T> Original { get; }
+        IEnumerable<T> Filtered { get; }
+    }
+}

+ 51 - 0
NBAManagment/Filter/PageFilter.cs

@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace NBAManagment.Filter
+{
+    public class PageFilter<T> : IFilter<T>
+    {
+        public int CurrentPageNum { get; set; }
+        public int PageSize { get; set; }
+        public PageFilter(int pageSize, int currentPageNum)
+        {
+            this.PageSize = pageSize;
+            this.CurrentPageNum = currentPageNum;
+        }
+        public int GetPageCount(IEnumerable<T> collection)
+        {
+            var itemsCount = collection.Count();
+            var incompletePageCount = (itemsCount % PageSize) > 0 ? 1 : 0;
+            return itemsCount / PageSize + incompletePageCount;
+        }
+        private bool IsNumInPage(int pageNum)
+        {
+            int firstElementOnCurrentPageNum = PageSize * (CurrentPageNum - 1) + 1;
+            return pageNum >= firstElementOnCurrentPageNum &&
+                pageNum <= (firstElementOnCurrentPageNum + PageSize - 1);
+        }
+        public IEnumerable<T> Use(IEnumerable<T> collection)
+        {
+            bool elementsFind = false;
+            int currentPageNum = 1;
+            var resultCollection = new List<T>();
+            foreach (var item in collection)
+            {
+                if (IsNumInPage(currentPageNum))
+                {
+                    resultCollection.Add(item);
+                    elementsFind = true;
+                }
+                else if (elementsFind)
+                {
+                    break;
+                }
+                currentPageNum++;
+            }
+            return resultCollection;
+        }
+    }
+}

+ 77 - 0
NBAManagment/Filter/PagedEnumerable.cs

@@ -0,0 +1,77 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace NBAManagment.Filter
+{
+    public class PagedEnumerable<T> : IFilteredEnumerable<T>
+    {
+        private const int START_PAGE_NUM = 1;
+        private readonly PageFilter<T> pageFilter;
+        public PagedEnumerable(IEnumerable<T> collection, int pageSize)
+        {
+            this.Original = collection;
+            pageFilter = new PageFilter<T>(pageSize, START_PAGE_NUM);
+            UpdateFiltered();
+        }
+        public int CurrentPageItemCount => Original.Count();
+        public int ItemCount => Filtered.Count();
+        public IEnumerable<T> Original { get; set; }
+        public IEnumerable<T> Filtered { get; private set; }
+        public int PageCount => pageFilter.GetPageCount(Original);
+        public int PageSize
+        {
+            get => pageFilter.PageSize;
+            set
+            {
+                pageFilter.PageSize = value;
+                UpdateFiltered();
+            }
+        }
+        public int CurrentPageNum
+        {
+            get => pageFilter.CurrentPageNum;
+            set
+            {
+                if (value > PageCount)
+                {
+                    pageFilter.CurrentPageNum = PageCount;
+                }
+                else if (value <= 0)
+                {
+                    pageFilter.CurrentPageNum = 1;
+                }
+                else
+                {
+                    pageFilter.CurrentPageNum = value;
+                }
+                UpdateFiltered();
+            }
+        }
+        public void NextPage()
+        {
+            CurrentPageNum++;
+            UpdateFiltered();
+        }
+        public void PriviusPage()
+        {
+            CurrentPageNum--;
+            UpdateFiltered();
+        }
+        public IEnumerator<T> GetEnumerator()
+        {
+            return Filtered.GetEnumerator();
+        }
+        IEnumerator IEnumerable.GetEnumerator()
+        {
+            return Filtered.GetEnumerator();
+        }
+        private void UpdateFiltered()
+        {
+            Filtered = pageFilter.Use(Original);
+        }
+    }
+}

+ 82 - 0
NBAManagment/MainWindow.xaml

@@ -0,0 +1,82 @@
+<Window x:Name="MainScreen" x:Class="NBAManagment.MainWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        Title="Main Screen" Height="490" Width="800" ResizeMode="NoResize" Background="#FFF5F5F5" WindowStartupLocation="CenterScreen">
+    <Window.Resources>
+        <Style x:Key="ModernButton" TargetType="Button">
+            <Setter Property="Background" >
+                <Setter.Value>
+                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
+                        <GradientStop Color="#FF0078D7" Offset="0"/>
+                        <GradientStop Color="#FF005A9C" Offset="1"/>
+                    </LinearGradientBrush>
+                </Setter.Value>
+            </Setter>
+            <Setter Property="Foreground" Value="White"/>
+            <Setter Property="FontFamily" Value="Segoe UI"/>
+            <Setter Property="FontWeight" Value="Bold"/>
+            <Setter Property="FontSize" Value="16"/>
+            <Setter Property="BorderBrush" Value="Transparent"/>
+            <Setter Property="BorderThickness" Value="0"/>
+            <Setter Property="Padding" Value="15,10"/>
+            <Setter Property="Margin" Value="5"/>
+            <Setter Property="Template">
+                <Setter.Value>
+                    <ControlTemplate TargetType="Button">
+                        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="8">
+                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                        </Border>
+                    </ControlTemplate>
+                </Setter.Value>
+            </Setter>
+        </Style>
+    </Window.Resources>
+    <Grid>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="18*"/>
+            <ColumnDefinition Width="65*"/>
+            <ColumnDefinition Width="48*"/>
+            <ColumnDefinition Width="669*"/>
+        </Grid.ColumnDefinitions>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="100*"/>
+            <RowDefinition/>
+            <RowDefinition Height="Auto"/>
+        </Grid.RowDefinitions>
+
+        <StackPanel Grid.Row="2" Margin="0,283,0,0" Background="#FF0078D7" Grid.ColumnSpan="4" RenderTransformOrigin="0.504,1.162" Height="45" VerticalAlignment="Top" Grid.RowSpan="2" >
+            <TextBlock Text="{Binding SeasonInfo}" Width="794" Height="23" Foreground="White" RenderTransformOrigin="0.5,0.5" FontFamily="Segoe UI" FontWeight="Bold">
+                <TextBlock.RenderTransform>
+                    <TransformGroup>
+                        <ScaleTransform ScaleY="-1"/>
+                        <SkewTransform/>
+                        <RotateTransform/>
+                        <TranslateTransform/>
+                    </TransformGroup>
+                </TextBlock.RenderTransform>
+            </TextBlock>
+        </StackPanel>
+
+        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="33,0,0,0" Grid.Column="2" Grid.ColumnSpan="2">
+            <TextBlock Text="NBA Management System" FontSize="32" Margin="10" Width="471" Foreground="#FF333333" FontFamily="Segoe UI" Height="64" HorizontalAlignment="Center" FontWeight="Bold"/>
+            <TextBlock Text="Welcome to use this NBA Management system, you can redirect to different pages according to your role by clicking the buttons below." TextWrapping="Wrap" Height="62" Width="569" Foreground="#FF444343" FontFamily="Segoe UI" FontSize="16"/>
+        </StackPanel>
+
+        <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="157,63,0,191" Grid.Column="3" Grid.RowSpan="2">
+            <Button Content="Visitor" Style="{StaticResource ModernButton}" Click="Button_Click" Width="113"/>
+            <Button Content="Admin" Style="{StaticResource ModernButton}" Width="113"/>
+        </StackPanel>
+
+        <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Top" Width="772" Grid.ColumnSpan="4" Margin="14,142,0,0">
+            <Button Content="&lt;" Width="62" Height="84" Margin="10" Background="#FFF7F7F7" BorderBrush="White" FontSize="42" Foreground="Gray" FontFamily="Segoe UI" FontWeight="Bold"/>
+            <StackPanel Orientation="Horizontal" Width="619" Height="124"/>
+            <Button Content="&gt;" Width="53" Height="80" Background="#FFF7F7F7" BorderBrush="White" FontSize="42" Foreground="Gray" FontFamily="Segoe UI" FontWeight="Bold"/>
+        </StackPanel>
+
+        <Image HorizontalAlignment="Left" Height="114" Margin="10,13,0,0" VerticalAlignment="Top" Width="98" Source="/logo.jpg" Grid.Column="1" Grid.ColumnSpan="2"/>
+
+        <TextBlock Grid.Column="3" HorizontalAlignment="Left" Margin="63,287,0,-4" Grid.Row="2" Foreground="White" TextWrapping="Wrap" Text="The current season is 2016-2017, and the NBA already has a history of 71 years" Width="426" Grid.RowSpan="3"/>
+    </Grid>
+</Window>

+ 35 - 0
NBAManagment/MainWindow.xaml.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace NBAManagment
+{
+    /// <summary>
+    /// Логика взаимодействия для MainWindow.xaml
+    /// </summary>
+    public partial class MainWindow : Window
+    {
+        public MainWindow()
+        {
+            InitializeComponent();
+        }
+
+        private void Button_Click(object sender, RoutedEventArgs e)
+        {
+            VisitorMenu visitorMenu = new VisitorMenu();
+            visitorMenu.Show();
+            this.Close();
+        }
+    }
+}

+ 56 - 0
NBAManagment/MatchPhotoLineManger.cs

@@ -0,0 +1,56 @@
+using NBAManagment.Filter;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Windows.Controls;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+
+namespace NBAManagement
+{
+    public class MatchPhotoLineManger
+    {
+        private readonly IEnumerable<Image> imageViews;
+        private readonly PagedEnumerable<byte[]> images;
+
+        public MatchPhotoLineManger(IEnumerable<Image> imageViews, IEnumerable<byte[]> imageSources)
+        {
+            this.imageViews = imageViews;
+            this.images = new PagedEnumerable<byte[]>(imageSources, imageViews.Count());
+            UpdateViewImages();
+        }
+
+        public void NextPage()
+        {
+            images.NextPage();
+            UpdateViewImages();
+        }
+
+        public void PriviusPage()
+        {
+            images.PriviusPage();
+            UpdateViewImages();
+        }
+
+        private void UpdateViewImages()
+        {
+            var imagesArray = images.ToArray();
+            int i = 0;
+            foreach (var imageView in imageViews)
+            {
+                using (var memory = new MemoryStream(imagesArray[i]))
+                {
+                    BitmapImage image = new BitmapImage();
+                    memory.Position = 0;
+                    image.BeginInit();
+                    image.CacheOption = BitmapCacheOption.OnLoad;
+                    image.StreamSource = memory;
+                    image.EndInit();
+                    image.Freeze();
+                    imageView.Source = image;
+                    i++;
+                }
+            }
+        }
+    }
+}

+ 50 - 0
NBAManagment/Models/Image.cs

@@ -0,0 +1,50 @@
+namespace NBAManagement.Models
+{
+    using System;
+    using System.Collections.Generic;
+    using System.ComponentModel.DataAnnotations;
+    using System.ComponentModel.DataAnnotations.Schema;
+    using System.Data.Entity.Spatial;
+    using System.Drawing.Imaging;
+    using System.IO;
+
+    public partial class Image
+    {
+        public int Id { get; set; }
+
+        [Required]
+        public byte[] Img { get; set; }
+
+        [StringLength(50)]
+        public string Description { get; set; }
+
+        public int NumberOfLike { get; set; }
+
+        public DateTime CreateTime { get; set; }
+
+        //код с Gpt, ошибка та же что и с кодом ниже
+        //public void SaveAsFile(string filePath, ImageFormat format)
+        //{
+        //    if (Img == null || Img.Length == 0)
+        //    {
+        //        throw new ArgumentException("Изображение не может быть null или пустым.", nameof(Img));
+        //    }
+
+        //    using (var ms = new MemoryStream(Img))
+        //    {
+        //        var image = System.Drawing.Image.FromStream(ms);
+        //        image.Save(filePath, format);
+        //    }
+        //}
+
+
+        public void SaveAsFile(string filePath, ImageFormat format)
+        {
+            using (var ms = new MemoryStream(Img))//ошибка в этой строке 
+            {
+                var image = System.Drawing.Image.FromStream(ms);
+                image.Save(filePath, format);
+            }
+        }
+    }
+}

+ 316 - 0
NBAManagment/NBAManagment.csproj

@@ -0,0 +1,316 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{FEAA1A00-A11C-4F81-819E-5A5B559733BD}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>NBAManagment</RootNamespace>
+    <AssemblyName>NBAManagment</AssemblyName>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <WarningLevel>4</WarningLevel>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="BitMiracle.LibTiff.NET, Version=2.4.649.0, Culture=neutral, PublicKeyToken=53879b3e20e7a7d6, processorArchitecture=MSIL">
+      <HintPath>..\packages\BitMiracle.LibTiff.NET.2.4.649\lib\net40\BitMiracle.LibTiff.NET.dll</HintPath>
+    </Reference>
+    <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+      <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
+    </Reference>
+    <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+      <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
+    </Reference>
+    <Reference Include="IronSoftware.Drawing.Abstractions, Version=2024.11.0.8, Culture=neutral, PublicKeyToken=3bd0119b776a4800, processorArchitecture=MSIL">
+      <HintPath>..\packages\IronSoftware.Drawing.Abstractions.2024.11.8\lib\netstandard2.0\IronSoftware.Drawing.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="IronSoftware.Drawing.Common, Version=2024.12.0.3, Culture=neutral, PublicKeyToken=8d7e55c97b3e9835, processorArchitecture=MSIL">
+      <HintPath>..\packages\IronSoftware.System.Drawing.2024.12.3\lib\netstandard2.0\IronSoftware.Drawing.Common.dll</HintPath>
+    </Reference>
+    <Reference Include="SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13, processorArchitecture=MSIL">
+      <HintPath>..\packages\SixLabors.Fonts.1.0.0\lib\netstandard2.0\SixLabors.Fonts.dll</HintPath>
+    </Reference>
+    <Reference Include="SixLabors.ImageSharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13, processorArchitecture=MSIL">
+      <HintPath>..\packages\SixLabors.ImageSharp.2.1.9\lib\net472\SixLabors.ImageSharp.dll</HintPath>
+    </Reference>
+    <Reference Include="SixLabors.ImageSharp.Drawing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13, processorArchitecture=MSIL">
+      <HintPath>..\packages\SixLabors.ImageSharp.Drawing.1.0.0\lib\net472\SixLabors.ImageSharp.Drawing.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ComponentModel.DataAnnotations" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Net" />
+    <Reference Include="System.Numerics" />
+    <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.Security" />
+    <Reference Include="System.Text.Encoding.CodePages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Text.Encoding.CodePages.5.0.0\lib\net461\System.Text.Encoding.CodePages.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xaml">
+      <RequiredTargetFramework>4.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="WindowsBase" />
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+  </ItemGroup>
+  <ItemGroup>
+    <ApplicationDefinition Include="App.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </ApplicationDefinition>
+    <Compile Include="Entities\ActionType.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\Conference.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\Country.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\Department.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\Division.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\Gender.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\Image.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\Matchup.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\MatchupDetail.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\MatchupLogs.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\MatchupType.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\NBAshka.Context.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>NBAshka.Context.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\NBAshka.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\NBAshka.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>NBAshka.edmx</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\Organization.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\Player.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\PlayerInTeam.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\PlayerStatistic.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\Position.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\PostSeason.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\Quarter.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\Role.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\Season.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\Status.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\StatusOrganization.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\sysdiagrams.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\Team.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Entities\User.cs">
+      <DependentUpon>NBAshka.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Filter\IFilter.cs" />
+    <Compile Include="Filter\IFilteredEnumerable.cs" />
+    <Compile Include="Filter\PagedEnumerable.cs" />
+    <Compile Include="Filter\PageFilter.cs" />
+    <Compile Include="MatchPhotoLineManger.cs" />
+    <Compile Include="Models\Image.cs" />
+    <Compile Include="PhotosPage.xaml.cs">
+      <DependentUpon>PhotosPage.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="TeamDetail.xaml.cs">
+      <DependentUpon>TeamDetail.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="TeamsMain.xaml.cs">
+      <DependentUpon>TeamsMain.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="TeamsViewModel.cs" />
+    <Compile Include="VisitorMenu.xaml.cs">
+      <DependentUpon>VisitorMenu.xaml</DependentUpon>
+    </Compile>
+    <Page Include="MainWindow.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Compile Include="App.xaml.cs">
+      <DependentUpon>App.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="MainWindow.xaml.cs">
+      <DependentUpon>MainWindow.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+    <Page Include="PhotosPage.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="TeamDetail.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="TeamsMain.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="VisitorMenu.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+    <EntityDeploy Include="Entities\NBAshka.edmx">
+      <Generator>EntityModelCodeGenerator</Generator>
+      <LastGenOutput>NBAshka.Designer.cs</LastGenOutput>
+    </EntityDeploy>
+    <None Include="Entities\NBAshka.edmx.diagram">
+      <DependentUpon>NBAshka.edmx</DependentUpon>
+    </None>
+    <None Include="packages.config" />
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <Resource Include="logo.jpg" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Entities\NBAshka.Context.tt">
+      <Generator>TextTemplatingFileGenerator</Generator>
+      <LastGenOutput>NBAshka.Context.cs</LastGenOutput>
+      <DependentUpon>NBAshka.edmx</DependentUpon>
+    </Content>
+    <Content Include="Entities\NBAshka.tt">
+      <Generator>TextTemplatingFileGenerator</Generator>
+      <DependentUpon>NBAshka.edmx</DependentUpon>
+      <LastGenOutput>NBAshka.cs</LastGenOutput>
+    </Content>
+    <None Include="Resources\download.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
+  </ItemGroup>
+  <ItemGroup>
+    <COMReference Include="EnvDTE">
+      <Guid>{80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}</Guid>
+      <VersionMajor>8</VersionMajor>
+      <VersionMinor>0</VersionMinor>
+      <Lcid>0</Lcid>
+      <WrapperTool>tlbimp</WrapperTool>
+      <Isolated>False</Isolated>
+      <EmbedInteropTypes>True</EmbedInteropTypes>
+    </COMReference>
+    <COMReference Include="stdole">
+      <Guid>{00020430-0000-0000-C000-000000000046}</Guid>
+      <VersionMajor>2</VersionMajor>
+      <VersionMinor>0</VersionMinor>
+      <Lcid>0</Lcid>
+      <WrapperTool>primary</WrapperTool>
+      <Isolated>False</Isolated>
+      <EmbedInteropTypes>True</EmbedInteropTypes>
+    </COMReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 64 - 0
NBAManagment/PhotosPage.xaml

@@ -0,0 +1,64 @@
+<Window x:Class="NBAManagment.PhotosPage"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:NBAManagment"
+        mc:Ignorable="d"
+        Title="PhotosPage" Height="450" Width="800">
+    <Grid>
+        <TextBlock Text="When you like a photo, you can right-click a photo and choose the download menu item in the context menu to download."
+            HorizontalAlignment="Center" Margin="10"
+            FontSize="14px"/>
+        <Border BorderThickness="1" Margin="10, 35, 10, 45">
+            <ListView Name="imagesListView" ItemsSource="{Binding PagedPictures.Filtered}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Margin="-1,0,1,0">
+                <ListView.ItemsPanel>
+                    <ItemsPanelTemplate>
+                        <WrapPanel ItemHeight="180" ItemWidth="250" 
+                            Width="{Binding Path=ActualWidth, ElementName=imagesListView}" 
+                            Orientation="Horizontal"/>
+                    </ItemsPanelTemplate>
+                </ListView.ItemsPanel>
+                <ListView.ItemTemplate>
+                    <DataTemplate>
+                        <Grid>
+                            <Button Margin="5" PreviewMouseRightButtonDown="ShowDownloadPoput">
+                                <Image Source="{Binding Img}" Stretch="Fill"/>
+                            </Button>
+                        </Grid>
+                    </DataTemplate>
+                </ListView.ItemTemplate>
+            </ListView>
+        </Border>
+        <Popup x:Name="downloadPoput" Width="125" Height="30" IsOpen="False" Placement="Mouse" PopupAnimation="None" StaysOpen="False">
+            <Grid>
+                <Button Click="DownloadImage" Margin="0">
+                    <Button.Content>
+                        <StackPanel Orientation="Horizontal">
+                            <Image Source="/NBAManagement;component/Resources/download.png" Height="25" Width="25"/>
+                            <TextBlock Text="Download" FontSize="16px"/>
+                        </StackPanel>
+                    </Button.Content>
+                </Button>
+            </Grid>
+        </Popup>
+        <StackPanel VerticalAlignment="Bottom" Margin="10" Orientation="Horizontal">
+            <TextBlock Text="Total " Foreground="Black" FontSize="18px" FontWeight="Bold" FontStyle="Italic" />
+            <TextBlock Text="{Binding PagedPictures.CurrentPageItemCount}" Foreground="Black" FontSize="18px" FontWeight="Bold" FontStyle="Italic" />
+            <TextBlock Text=" Photos, " Foreground="Black" FontSize="18px" FontWeight="Bold" FontStyle="Italic" />
+            <TextBlock Text="{Binding PagedPictures.ItemCount}" Foreground="Black" FontSize="18px" FontWeight="Bold" FontStyle="Italic" />
+            <TextBlock Text=" Photos in one page, Total " Foreground="Black" FontSize="18px" FontWeight="Bold" FontStyle="Italic" />
+            <TextBlock Text="{Binding PagedPictures.PageCount}" Foreground="Black" FontSize="18px" FontWeight="Bold" FontStyle="Italic" />
+            <TextBlock Text=" Pages" Foreground="Black" FontSize="18px" FontWeight="Bold" FontStyle="Italic" />
+        </StackPanel>
+        <StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="10" Orientation="Horizontal">
+            <Button Content="|&lt;" Padding="10, 2" BorderBrush="Black" Margin="3, 0" Click="FirstPage"/>
+            <Button Content="&lt;" Padding="10, 2" BorderBrush="Black" Margin="3, 0" Click="PriveusPage"/>
+            <TextBox Name="pageNumTaxtBlock" Text="{Binding PageNum}" Width="30" Padding="4" TextAlignment="Center" Margin="3, 0"/>
+            <Button Content="&gt;" Padding="10, 2" BorderBrush="Black" Margin="3, 0" Click="NextPage"/>
+            <Button Content="&gt;|" Padding="10, 2" BorderBrush="Black" Margin="3, 0" Click="LastPage"/>
+            <Button Margin="50, 0, 10, 0" Content="Download photos in current page" Padding="10, 2" BorderBrush="Black"
+             Click="DownloadPageImages"/>
+        </StackPanel>
+    </Grid>
+</Window>

+ 129 - 0
NBAManagment/PhotosPage.xaml.cs

@@ -0,0 +1,129 @@
+using Microsoft.Win32;
+using NBAManagement.Models;
+using NBAManagment.Entities;
+using NBAManagment.Filter;
+using System;
+using System.Collections.Generic;
+using System.Drawing.Imaging;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace NBAManagment
+{
+    /// <summary>
+    /// Логика взаимодействия для PhotosPage.xaml
+    /// </summary>
+    public partial class PhotosPage : Window
+    {
+        private const int PAGE_ELEMENT_COUNT = 12;
+
+        public PagedEnumerable<NBAManagement.Models.Image> PagedImage { get; private set; }
+        public int PageNum
+        {
+            get => PagedImage.CurrentPageNum;
+            set
+            {
+                PagedImage.CurrentPageNum = value;
+                UpdateBindings();
+            }
+        }
+        public PhotosPage()
+        {
+            InitializeComponent();
+
+            using (var context = new PracticeNBAEntities()) // Создание экземпляра контекста
+            {
+                var images = context.Image
+                    .OrderByDescending(p => p.CreateTime)
+                    .ToList();
+
+                // Преобразование List<NBAManagment.Entities.Image> в List<NBAManagement.Models.Image> 
+                var pagedImages = images.Select(img => new NBAManagement.Models.Image
+                {
+                    Id = img.IdImage,
+                    CreateTime = img.CreateTime ?? DateTime.MinValue, // Замените на подходящее значение по умолчанию 
+                                                                      // Другие свойства... 
+                }).ToList();
+
+                PagedImage = new PagedEnumerable<NBAManagement.Models.Image>(pagedImages, PAGE_ELEMENT_COUNT);
+                DataContext = this;
+            }
+        }
+        public void UpdateBindings()
+        {
+            var dataContext = DataContext;
+            DataContext = null;
+            DataContext = dataContext;
+        }
+
+        private void FirstPage(object sender, RoutedEventArgs e)
+        {
+            PageNum = 1;
+        }
+
+        private void PriveusPage(object sender, RoutedEventArgs e)
+        {
+            PageNum--;
+        }
+
+        private void NextPage(object sender, RoutedEventArgs e)
+        {
+            PageNum++;
+        }
+
+        private void LastPage(object sender, RoutedEventArgs e)
+        {
+            PageNum = PagedImage.PageCount;
+        }
+
+        private NBAManagement.Models.Image pictureToDownload;
+        private void DownloadImage(object sender, RoutedEventArgs e)
+        {
+            var saveFileDialog = new SaveFileDialog();
+            saveFileDialog.Filter = "Png | *.png";
+            downloadPoput.IsOpen = false;
+            if (saveFileDialog.ShowDialog() != true)
+                return;
+
+            if (!saveFileDialog.CheckPathExists)
+            {
+                MessageBox.Show("Путь несуществует", "Ошибка",
+                    MessageBoxButton.OK, MessageBoxImage.Error);
+            }
+
+            pictureToDownload.SaveAsFile(saveFileDialog.FileName, ImageFormat.Png);
+        }
+
+        private void DownloadPageImages(object sender, RoutedEventArgs e)
+        {
+            var folderDialog = new System.Windows.Forms.FolderBrowserDialog();
+            if (folderDialog.ShowDialog() != System.Windows.Forms.DialogResult.OK)
+                return;
+
+            int i = 0;
+            foreach (var item in PagedImage)
+            {
+                item.SaveAsFile($@"{folderDialog.SelectedPath}/picture{++i}.png", ImageFormat.Png);
+            }
+
+            MessageBox.Show("Файлы успешно записаны на диск");
+        }
+
+        private void ShowDownloadPoput(object sender, MouseButtonEventArgs e)
+        {
+            pictureToDownload = (NBAManagement.Models.Image)((Button)sender).DataContext;
+            downloadPoput.IsOpen = true;
+        }
+    }
+}

+ 55 - 0
NBAManagment/Properties/AssemblyInfo.cs

@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// Общие сведения об этой сборке предоставляются следующим набором
+// набор атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
+// связанные со сборкой.
+[assembly: AssemblyTitle("NBAManagment")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("NBAManagment")]
+[assembly: AssemblyCopyright("Copyright ©  2024")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
+// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
+// из модели COM, установите атрибут ComVisible для этого типа в значение true.
+[assembly: ComVisible(false)]
+
+//Чтобы начать создание локализуемых приложений, задайте
+//<UICulture>CultureYouAreCodingWith</UICulture> в файле .csproj
+//в <PropertyGroup>. Например, при использовании английского (США)
+//в своих исходных файлах установите <UICulture> в en-US.  Затем отмените преобразование в комментарий
+//атрибута NeutralResourceLanguage ниже.  Обновите "en-US" в
+//строка внизу для обеспечения соответствия настройки UICulture в файле проекта.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+    ResourceDictionaryLocation.None, //где расположены словари ресурсов по конкретным тематикам
+                                     //(используется, если ресурс не найден на странице,
+                                     // или в словарях ресурсов приложения)
+    ResourceDictionaryLocation.SourceAssembly //где расположен словарь универсальных ресурсов
+                                              //(используется, если ресурс не найден на странице,
+                                              // в приложении или в каких-либо словарях ресурсов для конкретной темы)
+)]
+
+
+// Сведения о версии для сборки включают четыре следующих значения:
+//
+//      Основной номер версии
+//      Дополнительный номер версии
+//      Номер сборки
+//      Номер редакции
+//
+// Можно задать все значения или принять номера сборки и редакции по умолчанию 
+// используя "*", как показано ниже:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 73 - 0
NBAManagment/Properties/Resources.Designer.cs

@@ -0,0 +1,73 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace NBAManagment.Properties {
+    using System;
+    
+    
+    /// <summary>
+    ///   Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
+    /// </summary>
+    // Этот класс создан автоматически классом StronglyTypedResourceBuilder
+    // с помощью такого средства, как ResGen или Visual Studio.
+    // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
+    // с параметром /str или перестройте свой проект VS.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NBAManagment.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Перезаписывает свойство CurrentUICulture текущего потока для всех
+        ///   обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   Поиск локализованного ресурса типа System.Drawing.Bitmap.
+        /// </summary>
+        internal static System.Drawing.Bitmap download {
+            get {
+                object obj = ResourceManager.GetObject("download", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+    }
+}

+ 124 - 0
NBAManagment/Properties/Resources.resx

@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="download" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\download.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+</root>

+ 30 - 0
NBAManagment/Properties/Settings.Designer.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace NBAManagment.Properties
+{
+
+
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+    }
+}

+ 7 - 0
NBAManagment/Properties/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

BIN
NBAManagment/Resources/download.png


+ 241 - 0
NBAManagment/TeamDetail.xaml

@@ -0,0 +1,241 @@
+<Window x:Class="NBAManagment.TeamDetail"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:NBAManagment"
+        mc:Ignorable="d"
+        Title="TeamDetail" Height="450" Width="800" Loaded="Page_Loaded" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
+    <Grid>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="53*"/>
+            <ColumnDefinition Width="107*"/>
+        </Grid.ColumnDefinitions>
+        <StackPanel Grid.ColumnSpan="2" Margin="0,58,0,-43">
+            <TabControl Height="378">
+                <TabItem Header="Roster">
+
+                    <DataGrid Name="DataGridEmployee" AutoGenerateColumns="False" IsReadOnly="True">
+                        
+                        <DataGrid.Columns>
+                            <DataGridTextColumn Header="id" Binding="{Binding IdPlayerInTeam, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
+                            <DataGridTextColumn Header="id player" Binding="{Binding IdPlayer, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
+                            <DataGridTextColumn Header="id team" Binding="{Binding IdTeam, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
+                            <DataGridTextColumn Header="id season" Binding="{Binding IdSeason, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
+                            <DataGridTextColumn Header="shirt_number" Binding="{Binding ShirtNumber, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
+                            <DataGridTextColumn Header="salary" Binding="{Binding Salary, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
+                            <DataGridTextColumn Header="starter index" Binding="{Binding StarterIndex, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
+                        </DataGrid.Columns>
+                    </DataGrid>
+                </TabItem>
+                <TabItem Header="Matchup">
+                    <DataGrid Name="DataGridEmployee1" AutoGenerateColumns="False" IsReadOnly="True">
+                        <DataGrid.Columns>
+                            <DataGridTextColumn Header="id matchup detail" Binding="{Binding IdMatchupDetail, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
+                            <DataGridTextColumn Header="id matchup" Binding="{Binding IdMatchup, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
+                            <DataGridTextColumn Header="id quarter" Binding="{Binding IdQuarter, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
+                            <DataGridTextColumn Header="Team away score" Binding="{Binding TeamAwayScore, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
+                            <DataGridTextColumn Header="Team home score" Binding="{Binding TeamHomeScore, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
+                        </DataGrid.Columns>
+                    </DataGrid>
+
+
+                </TabItem>
+            </TabControl>
+        </StackPanel>
+        <StackPanel RenderTransformOrigin="0.489,0.495" Margin="0,0,0,375" Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="800">
+            <StackPanel.RenderTransform>
+                <TransformGroup>
+                    <ScaleTransform ScaleY="1"/>
+                    <SkewTransform/>
+                    <RotateTransform/>
+                    <TranslateTransform/>
+                </TransformGroup>
+            </StackPanel.RenderTransform>
+            <Grid Height="584" Width="800">
+
+                <!-- Кнопка "Back" -->
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="Auto"/>
+                    <RowDefinition Height="*"/>
+                    <RowDefinition Height="Auto"/>
+                </Grid.RowDefinitions>
+
+                <!-- Заголовок окна -->
+                <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10">
+                    <TextBlock Text="Team Detail" VerticalAlignment="Center" FontSize="24" Margin="10,0,0,0" FontFamily="Century" FontWeight="Bold" Width="156"/>
+                </StackPanel>
+
+                <!-- Вкладки с конференциями -->
+                <TabControl Grid.Row="1" Margin="10">
+                    <TabItem Header="Eastern" TextBlock.FontFamily="Century">
+                        <Grid>
+                            <Grid.ColumnDefinitions>
+                                <ColumnDefinition Width="*"/>
+                                <ColumnDefinition Width="*"/>
+                                <ColumnDefinition Width="*"/>
+                            </Grid.ColumnDefinitions>
+                            <Border Grid.Column="1" BorderBrush="Black" BorderThickness="1" Margin="5">
+                                <StackPanel>
+                                    <TextBlock Text="Central" FontSize="18" Margin="5" FontFamily="Century" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                                    <!-- Команды Центрального дивизиона -->
+                                    <ItemsControl ItemsSource="{Binding CentralTeams}">
+                                        <ItemsControl.ItemTemplate>
+                                            <DataTemplate>
+                                                <StackPanel Orientation="Horizontal" Margin="5">
+                                                    <Ellipse Width="50" Height="50" Fill="Orange" Margin="5,0,10,0">
+                                                        <Ellipse.ToolTip>
+                                                            <TextBlock Text="{Binding TeamName}"/>
+                                                        </Ellipse.ToolTip>
+                                                    </Ellipse>
+                                                    <StackPanel Orientation="Vertical">
+                                                        <TextBlock Text="{Binding TeamName}" FontWeight="Bold" Margin="0,0,0,5"/>
+                                                        <StackPanel Orientation="Horizontal">
+                                                            <Button Content="Roster" Margin="0,0,5,0"/>
+                                                            <Button Content="Matchup" Margin="0,0,5,0"/>
+                                                            <Button Content="First Lineup" Margin="0,0,5,0" />
+                                                        </StackPanel>
+                                                    </StackPanel>
+                                                </StackPanel>
+                                            </DataTemplate>
+                                        </ItemsControl.ItemTemplate>
+                                    </ItemsControl>
+                                </StackPanel>
+                            </Border>
+                            <Border Grid.Column="2" BorderBrush="Black" BorderThickness="1" Margin="5">
+                                <StackPanel>
+                                    <TextBlock Text="Southeast" FontSize="18" Margin="5" FontFamily="Century" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                                    <!-- Команды Юго-восточного дивизиона -->
+                                    <ItemsControl ItemsSource="{Binding SoutheastTeams}">
+                                        <ItemsControl.ItemTemplate>
+                                            <DataTemplate>
+                                                <StackPanel Orientation="Horizontal" Margin="5">
+                                                    <Ellipse Width="50" Height="50" Fill="Orange" Margin="5,0,10,0">
+                                                        <Ellipse.ToolTip>
+                                                            <TextBlock Text="{Binding TeamName}"/>
+                                                        </Ellipse.ToolTip>
+                                                    </Ellipse>
+                                                    <StackPanel Orientation="Vertical">
+                                                        <TextBlock Text="{Binding TeamName}" FontWeight="Bold" Margin="0,0,0,5"/>
+                                                        <StackPanel Orientation="Horizontal">
+                                                            <Button Content="Roster" Margin="0,0,5,0"/>
+                                                            <Button Content="Matchup" Margin="0,0,5,0" />
+                                                            <Button Content="First Lineup" Margin="0,0,5,0" />
+                                                        </StackPanel>
+                                                    </StackPanel>
+                                                </StackPanel>
+                                            </DataTemplate>
+                                        </ItemsControl.ItemTemplate>
+                                    </ItemsControl>
+                                </StackPanel>
+                            </Border>
+                            <ListView d:ItemsSource="{d:SampleData ItemCount=5}">
+                                <ListView.View>
+                                    <GridView>
+                                        <GridViewColumn/>
+                                    </GridView>
+                                </ListView.View>
+                            </ListView>
+
+
+                        </Grid>
+                    </TabItem>
+                    <TabItem Header="Western" TextBlock.FontFamily="Century">
+                        <Grid>
+                            <Grid.ColumnDefinitions>
+                                <ColumnDefinition Width="*"/>
+                                <ColumnDefinition Width="*"/>
+                                <ColumnDefinition Width="*"/>
+                            </Grid.ColumnDefinitions>
+                            <Border Grid.Column="0" BorderBrush="Black" BorderThickness="1" Margin="5">
+                                <StackPanel>
+                                    <TextBlock Text="Northwest" FontSize="18" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                                    <!-- Команды Северо-западного дивизиона -->
+                                    <ItemsControl ItemsSource="{Binding NorthwestTeams}">
+                                        <ItemsControl.ItemTemplate>
+                                            <DataTemplate>
+                                                <StackPanel Orientation="Horizontal" Margin="5">
+                                                    <Ellipse Width="50" Height="50" Fill="Orange" Margin="5,0,10,0">
+                                                        <Ellipse.ToolTip>
+                                                            <TextBlock Text="{Binding TeamName}"/>
+                                                        </Ellipse.ToolTip>
+                                                    </Ellipse>
+                                                    <StackPanel Orientation="Vertical">
+                                                        <TextBlock Text="{Binding TeamName}" FontWeight="Bold" Margin="0,0,0,5"/>
+                                                        <StackPanel Orientation="Horizontal">
+                                                            <Button Content="Roster" Margin="0,0,5,0" />
+                                                            <Button Content="Matchup" Margin="0,0,5,0" />
+                                                            <Button Content="First Lineup" Margin="0,0,5,0" />
+                                                        </StackPanel>
+                                                    </StackPanel>
+                                                </StackPanel>
+                                            </DataTemplate>
+                                        </ItemsControl.ItemTemplate>
+                                    </ItemsControl>
+                                </StackPanel>
+                            </Border>
+                            <Border Grid.Column="1" BorderBrush="Black" BorderThickness="1" Margin="5">
+                                <StackPanel>
+                                    <TextBlock Text="Pacific" FontSize="18" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                                    <!-- Команды Тихоокеанского дивизиона -->
+                                    <ItemsControl ItemsSource="{Binding PacificTeams}">
+                                        <ItemsControl.ItemTemplate>
+                                            <DataTemplate>
+                                                <StackPanel Orientation="Horizontal" Margin="5">
+                                                    <Ellipse Width="50" Height="50" Fill="Orange" Margin="5,0,10,0">
+                                                        <Ellipse.ToolTip>
+                                                            <TextBlock Text="{Binding TeamName}"/>
+                                                        </Ellipse.ToolTip>
+                                                    </Ellipse>
+                                                    <StackPanel Orientation="Vertical">
+                                                        <TextBlock Text="{Binding TeamName}" FontWeight="Bold" Margin="0,0,0,5"/>
+                                                        <StackPanel Orientation="Horizontal">
+                                                            <Button Content="Roster" Margin="0,0,5,0"/>
+                                                            <Button Content="Matchup" Margin="0,0,5,0"/>
+                                                            <Button Content="First Lineup" Margin="0,0,5,0"/>
+                                                        </StackPanel>
+                                                    </StackPanel>
+                                                </StackPanel>
+                                            </DataTemplate>
+                                        </ItemsControl.ItemTemplate>
+                                    </ItemsControl>
+                                </StackPanel>
+                            </Border>
+                            <Border Grid.Column="2" BorderBrush="Black" BorderThickness="1" Margin="5">
+                                <StackPanel>
+                                    <TextBlock Text="Southwest" FontSize="18" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                                    <!-- Команды Юго-западного дивизиона -->
+                                    <ItemsControl ItemsSource="{Binding SouthwestTeams}">
+                                        <ItemsControl.ItemTemplate>
+                                            <DataTemplate>
+                                                <StackPanel Orientation="Horizontal" Margin="5">
+                                                    <Ellipse Width="50" Height="50" Fill="Orange" Margin="5,0,10,0">
+                                                        <Ellipse.ToolTip>
+                                                            <TextBlock Text="{Binding TeamName}"/>
+                                                        </Ellipse.ToolTip>
+                                                    </Ellipse>
+                                                    <StackPanel Orientation="Vertical">
+                                                        <TextBlock Text="{Binding TeamName}" FontWeight="Bold" Margin="0,0,0,5"/>
+                                                        <StackPanel Orientation="Horizontal">
+                                                            <Button Content="Roster" Margin="0,0,5,0"/>
+                                                            <Button Content="Matchup" Margin="0,0,5,0" />
+                                                            <Button Content="First Lineup" Margin="0,0,5,0"/>
+                                                        </StackPanel>
+                                                    </StackPanel>
+                                                </StackPanel>
+                                            </DataTemplate>
+                                        </ItemsControl.ItemTemplate>
+                                    </ItemsControl>
+                                </StackPanel>
+                            </Border>
+                        </Grid>
+                    </TabItem>
+                </TabControl>
+                <Button Content="Back" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="663,0,0,0"  Height="32" Width="95"  TextBlock.FontFamily="Century"/>
+                <Image HorizontalAlignment="Left" Height="59" Margin="12,3,0,0" VerticalAlignment="Top" Width="23" Source="/logo.jpg" Grid.RowSpan="2"/>
+                <TextBlock Text="NBA Management System" Foreground="Gray" FontFamily="Century" Margin="47,20,589,8" FontSize="10"/>
+
+            </Grid>
+        </StackPanel>
+    </Grid>
+</Window>

+ 57 - 0
NBAManagment/TeamDetail.xaml.cs

@@ -0,0 +1,57 @@
+using NBAManagment.Entities;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace NBAManagment
+{
+    /// <summary>
+    /// Логика взаимодействия для TeamDetail.xaml
+    /// </summary>
+    public partial class TeamDetail : Window
+    {
+        public static PracticeNBAEntities DataEntitiesEmployee { get; set; }
+
+        public static ObservableCollection<PlayerInTeam> ListEmployee;
+
+        public static PracticeNBAEntities DataEntitiesEmploye1 { get; set; }
+        public static ObservableCollection<MatchupDetail> ListEmployee1;
+        public TeamDetail()
+        {
+            DataEntitiesEmployee = new PracticeNBAEntities();
+            DataEntitiesEmploye1 = new PracticeNBAEntities();
+            InitializeComponent();
+            ListEmployee = new ObservableCollection<PlayerInTeam>();
+            ListEmployee1 = new ObservableCollection<MatchupDetail>();
+        }
+        private void Page_Loaded(object sender, RoutedEventArgs e)
+        {
+            var querryEmployee = DataEntitiesEmployee.PlayerInTeam.OrderBy(Employee => Employee.IdPlayerInTeam);
+            foreach(PlayerInTeam emp in querryEmployee)
+            {
+                ListEmployee.Add(emp);
+            }
+            DataGridEmployee.ItemsSource = ListEmployee;
+
+            var querryEmployee1 = DataEntitiesEmployee.MatchupDetail.OrderBy(Employee => Employee.IdMatchupDetail);
+            foreach (MatchupDetail emp1 in querryEmployee1)
+            {
+                ListEmployee1.Add(emp1);
+            }
+            DataGridEmployee1.ItemsSource = ListEmployee1;
+        }
+    
+       
+    }
+}

+ 217 - 0
NBAManagment/TeamsMain.xaml

@@ -0,0 +1,217 @@
+<Window
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:av="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="av" x:Class="NBAManagment.TeamsMain"
+        Title="Teams Main" Height="600" Width="800" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="*"/>
+            <RowDefinition Height="Auto"/>
+        </Grid.RowDefinitions>
+
+        <!-- Заголовок окна -->
+        <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10">
+            <TextBlock Text="Teams Main" VerticalAlignment="Center" FontSize="24" Margin="10,0,0,0" FontFamily="Century" FontWeight="Bold"/>
+        </StackPanel>
+
+        <!-- Вкладки с конференциями -->
+        <TabControl Grid.Row="1" Margin="10">
+            <TabItem Header="Eastern" TextBlock.FontFamily="Century">
+                <Grid>
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="*"/>
+                        <ColumnDefinition Width="*"/>
+                        <ColumnDefinition Width="*"/>
+                    </Grid.ColumnDefinitions>
+                    <Border Grid.Column="0" BorderBrush="Black" BorderThickness="1" Margin="5">
+                        <StackPanel>
+                            <TextBlock Text="Atlantic" FontSize="18" Margin="5" FontFamily="Century" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                            <!-- Команды Атлантического дивизиона -->
+                            <ItemsControl ItemsSource="{Binding AtlanticTeams}">
+                                <ItemsControl.ItemTemplate>
+                                    <DataTemplate>
+                                        <StackPanel Orientation="Horizontal" Margin="5">
+                                            <Ellipse Width="50" Height="50" Fill="Orange" Margin="5,0,10,0">
+                                                <Ellipse.ToolTip>
+                                                    <TextBlock Text="{Binding TeamName}"/>
+                                                </Ellipse.ToolTip>
+                                            </Ellipse>
+                                            <StackPanel Orientation="Vertical">
+                                                <TextBlock Text="{Binding TeamName}" FontWeight="Bold" Margin="0,0,0,5"/>
+                                                <StackPanel Orientation="Horizontal">
+                                                    <Button Content="Roster" Margin="0,0,5,0" />
+                                                    <Button Content="Matchup" Margin="0,0,5,0" />
+                                                    <Button Content="First Lineup" Margin="0,0,5,0"/>
+                                                </StackPanel>
+                                            </StackPanel>
+                                        </StackPanel>
+                                    </DataTemplate>
+                                </ItemsControl.ItemTemplate>
+                            </ItemsControl>
+                            <ListView Height="100" av:ItemsSource="{av:SampleData ItemCount=5}">
+                                <ListView.View>
+                                    <GridView>
+                                        <GridViewColumn/>
+                                    </GridView>
+                                </ListView.View>
+                            </ListView>
+                        </StackPanel>
+                    </Border>
+                    <Border Grid.Column="1" BorderBrush="Black" BorderThickness="1" Margin="5">
+                        <StackPanel>
+                            <TextBlock Text="Central" FontSize="18" Margin="5" FontFamily="Century" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                            <!-- Команды Центрального дивизиона -->
+                            <ItemsControl ItemsSource="{Binding CentralTeams}">
+                                <ItemsControl.ItemTemplate>
+                                    <DataTemplate>
+                                        <StackPanel Orientation="Horizontal" Margin="5">
+                                            <Ellipse Width="50" Height="50" Fill="Orange" Margin="5,0,10,0">
+                                                <Ellipse.ToolTip>
+                                                    <TextBlock Text="{Binding TeamName}"/>
+                                                </Ellipse.ToolTip>
+                                            </Ellipse>
+                                            <StackPanel Orientation="Vertical">
+                                                <TextBlock Text="{Binding TeamName}" FontWeight="Bold" Margin="0,0,0,5"/>
+                                                <StackPanel Orientation="Horizontal">
+                                                    <Button Content="Roster" Margin="0,0,5,0"/>
+                                                    <Button Content="Matchup" Margin="0,0,5,0"/>
+                                                    <Button Content="First Lineup" Margin="0,0,5,0" />
+                                                </StackPanel>
+                                            </StackPanel>
+                                        </StackPanel>
+                                    </DataTemplate>
+                                </ItemsControl.ItemTemplate>
+                            </ItemsControl>
+                            <Button Content="Временная кнопка для team detail" Click="Button_Click_1"/>
+                        </StackPanel>
+                    </Border>
+                    <Border Grid.Column="2" BorderBrush="Black" BorderThickness="1" Margin="5">
+                        <StackPanel>
+                            <TextBlock Text="Southeast" FontSize="18" Margin="5" FontFamily="Century" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                            <!-- Команды Юго-восточного дивизиона -->
+                            <ItemsControl ItemsSource="{Binding SoutheastTeams}">
+                                <ItemsControl.ItemTemplate>
+                                    <DataTemplate>
+                                        <StackPanel Orientation="Horizontal" Margin="5">
+                                            <Ellipse Width="50" Height="50" Fill="Orange" Margin="5,0,10,0">
+                                                <Ellipse.ToolTip>
+                                                    <TextBlock Text="{Binding TeamName}"/>
+                                                </Ellipse.ToolTip>
+                                            </Ellipse>
+                                            <StackPanel Orientation="Vertical">
+                                                <TextBlock Text="{Binding TeamName}" FontWeight="Bold" Margin="0,0,0,5"/>
+                                                <StackPanel Orientation="Horizontal">
+                                                    <Button Content="Roster" Margin="0,0,5,0"/>
+                                                    <Button Content="Matchup" Margin="0,0,5,0" />
+                                                    <Button Content="First Lineup" Margin="0,0,5,0" />
+                                                </StackPanel>
+                                            </StackPanel>
+                                        </StackPanel>
+                                    </DataTemplate>
+                                </ItemsControl.ItemTemplate>
+                            </ItemsControl>
+                        </StackPanel>
+                    </Border>
+                    
+                     
+                </Grid>
+            </TabItem>
+            <TabItem Header="Western" TextBlock.FontFamily="Century">
+                <Grid>
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="*"/>
+                        <ColumnDefinition Width="*"/>
+                        <ColumnDefinition Width="*"/>
+                    </Grid.ColumnDefinitions>
+                    <Border Grid.Column="0" BorderBrush="Black" BorderThickness="1" Margin="5">
+                        <StackPanel>
+                            <TextBlock Text="Northwest" FontSize="18" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                            <!-- Команды Северо-западного дивизиона -->
+                            <ItemsControl ItemsSource="{Binding NorthwestTeams}">
+                                <ItemsControl.ItemTemplate>
+                                    <DataTemplate>
+                                        <StackPanel Orientation="Horizontal" Margin="5">
+                                            <Ellipse Width="50" Height="50" Fill="Orange" Margin="5,0,10,0">
+                                                <Ellipse.ToolTip>
+                                                    <TextBlock Text="{Binding TeamName}"/>
+                                                </Ellipse.ToolTip>
+                                            </Ellipse>
+                                            <StackPanel Orientation="Vertical">
+                                                <TextBlock Text="{Binding TeamName}" FontWeight="Bold" Margin="0,0,0,5"/>
+                                                <StackPanel Orientation="Horizontal">
+                                                    <Button Content="Roster" Margin="0,0,5,0" />
+                                                    <Button Content="Matchup" Margin="0,0,5,0" />
+                                                    <Button Content="First Lineup" Margin="0,0,5,0" />
+                                                </StackPanel>
+                                            </StackPanel>
+                                        </StackPanel>
+                                    </DataTemplate>
+                                </ItemsControl.ItemTemplate>
+                            </ItemsControl>
+                        </StackPanel>
+                    </Border>
+                    <Border Grid.Column="1" BorderBrush="Black" BorderThickness="1" Margin="5">
+                        <StackPanel>
+                            <TextBlock Text="Pacific" FontSize="18" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                            <!-- Команды Тихоокеанского дивизиона -->
+                            <ItemsControl ItemsSource="{Binding PacificTeams}">
+                                <ItemsControl.ItemTemplate>
+                                    <DataTemplate>
+                                        <StackPanel Orientation="Horizontal" Margin="5">
+                                            <Ellipse Width="50" Height="50" Fill="Orange" Margin="5,0,10,0">
+                                                <Ellipse.ToolTip>
+                                                    <TextBlock Text="{Binding TeamName}"/>
+                                                </Ellipse.ToolTip>
+                                            </Ellipse>
+                                            <StackPanel Orientation="Vertical">
+                                                <TextBlock Text="{Binding TeamName}" FontWeight="Bold" Margin="0,0,0,5"/>
+                                                <StackPanel Orientation="Horizontal">
+                                                    <Button Content="Roster" Margin="0,0,5,0"/>
+                                                    <Button Content="Matchup" Margin="0,0,5,0"/>
+                                                    <Button Content="First Lineup" Margin="0,0,5,0"/>
+                                                </StackPanel>
+                                            </StackPanel>
+                                        </StackPanel>
+                                    </DataTemplate>
+                                </ItemsControl.ItemTemplate>
+                            </ItemsControl>
+                        </StackPanel>
+                    </Border>
+                    <Border Grid.Column="2" BorderBrush="Black" BorderThickness="1" Margin="5">
+                        <StackPanel>
+                            <TextBlock Text="Southwest" FontSize="18" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                            <!-- Команды Юго-западного дивизиона -->
+                            <ItemsControl ItemsSource="{Binding SouthwestTeams}">
+                                <ItemsControl.ItemTemplate>
+                                    <DataTemplate>
+                                        <StackPanel Orientation="Horizontal" Margin="5">
+                                            <Ellipse Width="50" Height="50" Fill="Orange" Margin="5,0,10,0">
+                                                <Ellipse.ToolTip>
+                                                    <TextBlock Text="{Binding TeamName}"/>
+                                                </Ellipse.ToolTip>
+                                            </Ellipse>
+                                            <StackPanel Orientation="Vertical">
+                                                <TextBlock Text="{Binding TeamName}" FontWeight="Bold" Margin="0,0,0,5"/>
+                                                <StackPanel Orientation="Horizontal">
+                                                    <Button Content="Roster" Margin="0,0,5,0"/>
+                                                    <Button Content="Matchup" Margin="0,0,5,0" />
+                                                    <Button Content="First Lineup" Margin="0,0,5,0"/>
+                                                </StackPanel>
+                                            </StackPanel>
+                                        </StackPanel>
+                                    </DataTemplate>
+                                </ItemsControl.ItemTemplate>
+                            </ItemsControl>
+                        </StackPanel>
+                    </Border>
+                </Grid>
+            </TabItem>
+        </TabControl>
+        <Button Content="Back" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="663,0,0,0"  Height="32" Width="95" Click="Button_Click" TextBlock.FontFamily="Century"/>
+        <Image HorizontalAlignment="Left" Height="59" Margin="12,3,0,0" VerticalAlignment="Top" Width="23" Source="/logo.jpg" Grid.RowSpan="2"/>
+        <TextBlock Text="NBA Management System" Foreground="Gray" FontFamily="Century" Margin="47,20,589,8" FontSize="10"/>
+
+        <!-- Кнопка "Back" -->
+    </Grid>
+</Window>

+ 41 - 0
NBAManagment/TeamsMain.xaml.cs

@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace NBAManagment
+{
+    /// <summary>
+    /// Логика взаимодействия для TeamsMain.xaml
+    /// </summary>
+    public partial class TeamsMain : Window
+    {
+        public TeamsMain()
+        {
+            InitializeComponent();
+        }
+
+        private void Button_Click(object sender, RoutedEventArgs e)
+        {
+            VisitorMenu visitorMenu = new VisitorMenu();
+            visitorMenu.Show();
+            this.Close();
+        }
+
+        private void Button_Click_1(object sender, RoutedEventArgs e)
+        {
+            TeamDetail teamDetail = new TeamDetail();
+            teamDetail.Show();
+            this.Close();
+        }
+    }
+}

+ 26 - 0
NBAManagment/TeamsViewModel.cs

@@ -0,0 +1,26 @@
+using NBAManagment.Entities;
+using System.Collections.ObjectModel;
+using System.Linq;
+
+public class TeamsViewModel
+{
+    public ObservableCollection<Team> AtlanticTeams { get; set; }
+    public ObservableCollection<Team> CentralTeams { get; set; }
+    public ObservableCollection<Team> SoutheastTeams { get; set; }
+    public ObservableCollection<Team> NorthwestTeams { get; set; }
+    public ObservableCollection<Team> PacificTeams { get; set; }
+    public ObservableCollection<Team> SouthwestTeams { get; set; }
+
+    public TeamsViewModel()
+    {
+        LoadTeams();
+    }
+
+    private void LoadTeams()
+    {
+        using (var context = new PracticeNBAEntities()) 
+        {
+         
+        }
+    }
+}

+ 96 - 0
NBAManagment/VisitorMenu.xaml

@@ -0,0 +1,96 @@
+<Window x:Class="NBAManagment.VisitorMenu"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        Title="Visitor Menu" Height="400" Width="600" ResizeMode="CanResize" Background="#FFF5F5F5" WindowStartupLocation="CenterScreen">
+    <Window.Resources>
+        <Style x:Key="ModernButton" TargetType="Button">
+            <Setter Property="Background">
+                <Setter.Value>
+                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
+                        <GradientStop Color="#FF0078D7" Offset="0"/>
+                        <GradientStop Color="#FF005A9C" Offset="1"/>
+                    </LinearGradientBrush>
+                </Setter.Value>
+            </Setter>
+            <Setter Property="Foreground" Value="White"/>
+            <Setter Property="FontFamily" Value="Segoe UI"/>
+            <Setter Property="FontWeight" Value="Bold"/>
+            <Setter Property="FontSize" Value="16"/>
+            <Setter Property="BorderBrush" Value="Transparent"/>
+            <Setter Property="BorderThickness" Value="0"/>
+            <Setter Property="Padding" Value="15,10"/>
+            <Setter Property="Margin" Value="5"/>
+            <Setter Property="Template">
+                <Setter.Value>
+                    <ControlTemplate TargetType="Button">
+                        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="8">
+                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                        </Border>
+                    </ControlTemplate>
+                </Setter.Value>
+            </Setter>
+        </Style>
+    </Window.Resources>
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="*"/>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="30"/>
+            <!-- Новая строка для синей полосы -->
+        </Grid.RowDefinitions>
+
+        <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10">
+            <TextBlock Text="Visitor Menu" VerticalAlignment="Center" FontSize="24" Margin="10,0,0,0" Width="129" FontFamily="Segoe UI" FontWeight="Bold"/>
+        </StackPanel>
+
+        <Grid Grid.Row="1" Margin="0,0,0,20">
+            <Grid.RowDefinitions>
+                <RowDefinition Height="*"/>
+                <RowDefinition Height="*"/>
+            </Grid.RowDefinitions>
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="35*"/>
+                <ColumnDefinition Width="5*"/>
+                <ColumnDefinition Width="110*"/>
+                <ColumnDefinition Width="136*"/>
+                <ColumnDefinition Width="10*"/>
+                <ColumnDefinition Width="4*"/>
+            </Grid.ColumnDefinitions>
+            <Frame x:Name="MainFrame" NavigationUIVisibility="Hidden" Grid.ColumnSpan="6" Margin="0,0,2,0" Grid.RowSpan="2"/>
+            <Button Content="Teams" Style="{StaticResource ModernButton}" Margin="5,39,75,51" Grid.ColumnSpan="2" Grid.Column="1" Click="Button_Click"/>
+            <Button Content="Players" Style="{StaticResource ModernButton}" Margin="75,39,47,51" Grid.Row="0" Grid.Column="3"/>
+            <Button Content="Matchups" Style="{StaticResource ModernButton}" Margin="5,27,75,63" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2"/>
+            <Button Content="Photos" Style="{StaticResource ModernButton}" Margin="75,27,47,63" Grid.Row="1" Grid.Column="3" Click="Button_Click_4"/>
+            <Image HorizontalAlignment="Left" Height="50" Margin="7,-47,0,0" VerticalAlignment="Top" Width="19" Source="/logo.jpg"/>
+        </Grid>
+
+        <Button Content="Back" Style="{StaticResource ModernButton}" Margin="0,21,22,11" Click="Button_Click_1" Width="88" HorizontalAlignment="Right"/>
+
+        <TextBlock Text="NBA Management System" Foreground="Gray" FontFamily="Segoe UI" Margin="35,19,404,12" RenderTransformOrigin="0.5,0.5" FontSize="12">
+            <TextBlock.RenderTransform>
+                <TransformGroup>
+                    <ScaleTransform/>
+                    <SkewTransform/>
+                    <RotateTransform Angle="0.047"/>
+                    <TranslateTransform/>
+                </TransformGroup>
+            </TextBlock.RenderTransform>
+        </TextBlock>
+
+        <!-- Синяя полоса внизу -->
+        <StackPanel Grid.Row="3" Background="#FF0078D7" VerticalAlignment="Center" Height="30">
+            <TextBlock Text="The current season is 2016–2017, and the NBA already has a history of 71 years."  FontSize="14" FontFamily="Segoe UI" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" />
+            <TextBlock Text="{Binding SeasonInfo}" Width="594" Height="12" Foreground="White" RenderTransformOrigin="0.5,0.5" FontFamily="Segoe UI" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center">
+                <TextBlock.RenderTransform>
+                    <TransformGroup>
+                        <ScaleTransform ScaleY="-1"/>
+                        <SkewTransform/>
+                        <RotateTransform/>
+                        <TranslateTransform/>
+                    </TransformGroup>
+                </TextBlock.RenderTransform>
+            </TextBlock>
+        </StackPanel>
+    </Grid>
+</Window>

+ 51 - 0
NBAManagment/VisitorMenu.xaml.cs

@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace NBAManagment
+{
+    /// <summary>
+    /// Логика взаимодействия для VisitorMenu.xaml
+    /// </summary>
+    public partial class VisitorMenu : Window
+    {
+        public VisitorMenu()
+        {
+            InitializeComponent();
+            
+        }
+
+
+        private void Button_Click_1(object sender, RoutedEventArgs e)
+        {
+            MainWindow mainWindow = new MainWindow();
+            mainWindow.Show();
+            this.Close();
+        }
+
+        private void Button_Click(object sender, RoutedEventArgs e)
+        {
+            TeamsMain teamsMain = new TeamsMain();
+            teamsMain.Show();
+            this.Close();
+        }
+
+        private void Button_Click_4(object sender, RoutedEventArgs e)
+        {
+            PhotosPage teamsMain = new PhotosPage();
+            teamsMain.Show();
+            this.Close();
+        }
+    }
+}

BIN
NBAManagment/logo.jpg


+ 16 - 0
NBAManagment/packages.config

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="BitMiracle.LibTiff.NET" version="2.4.649" targetFramework="net472" />
+  <package id="EntityFramework" version="6.2.0" targetFramework="net472" />
+  <package id="EntityFramework.ru" version="6.2.0" targetFramework="net472" />
+  <package id="IronSoftware.Drawing.Abstractions" version="2024.11.8" targetFramework="net472" />
+  <package id="IronSoftware.System.Drawing" version="2024.12.3" targetFramework="net472" />
+  <package id="SixLabors.Fonts" version="1.0.0" targetFramework="net472" />
+  <package id="SixLabors.ImageSharp" version="2.1.9" targetFramework="net472" />
+  <package id="SixLabors.ImageSharp.Drawing" version="1.0.0" targetFramework="net472" />
+  <package id="System.Buffers" version="4.5.1" targetFramework="net472" />
+  <package id="System.Memory" version="4.5.5" targetFramework="net472" />
+  <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
+  <package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net472" />
+  <package id="System.Text.Encoding.CodePages" version="5.0.0" targetFramework="net472" />
+</packages>