diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/.vscode/launch.json" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/.vscode/launch.json"
new file mode 100644
index 0000000000000000000000000000000000000000..b8ed648bdc06168da55885a99d080da117f54839
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/.vscode/launch.json"
@@ -0,0 +1,35 @@
+{
+ "version": "0.2.0",
+ "configurations": [
+ {
+ // Use IntelliSense to find out which attributes exist for C# debugging
+ // Use hover for the description of the existing attributes
+ // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
+ "name": ".NET Core Launch (web)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ // If you have changed target frameworks, make sure to update the program path.
+ "program": "${workspaceFolder}/bin/Debug/net6.0/CHW.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}",
+ "stopAtEntry": false,
+ // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
+ "serverReadyAction": {
+ "action": "openExternally",
+ "pattern": "\\bNow listening on:\\s+(https?://\\S+)"
+ },
+ "env": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "sourceFileMap": {
+ "/Views": "${workspaceFolder}/Views"
+ }
+ },
+ {
+ "name": ".NET Core Attach",
+ "type": "coreclr",
+ "request": "attach"
+ }
+ ]
+}
\ No newline at end of file
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/.vscode/tasks.json" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/.vscode/tasks.json"
new file mode 100644
index 0000000000000000000000000000000000000000..e542e5f6db9966303a601a5e88aa0f039925f52a
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/.vscode/tasks.json"
@@ -0,0 +1,41 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/CHW.csproj",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "publish",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "publish",
+ "${workspaceFolder}/CHW.csproj",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "watch",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "watch",
+ "run",
+ "--project",
+ "${workspaceFolder}/CHW.csproj"
+ ],
+ "problemMatcher": "$msCompile"
+ }
+ ]
+}
\ No newline at end of file
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/CHW.csproj" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/CHW.csproj"
new file mode 100644
index 0000000000000000000000000000000000000000..8de7df6f4f21f04bfaa9f625fbd8b6c25475e71e
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/CHW.csproj"
@@ -0,0 +1,18 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+
+
+
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Controllers/CHWController.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Controllers/CHWController.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..a1910d0842a8c28a21a59812425b9029d341f279
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Controllers/CHWController.cs"
@@ -0,0 +1,54 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using CHW.Models;
+using Microsoft.AspNetCore.Mvc;
+using static CHW.Models.Players;
+using Microsoft.EntityFrameworkCore;
+using CHW.DATE;
+
+namespace CHW.Controllers
+{
+ public class CHWController:Controller
+ {
+ public IActionResult index()
+ {
+ //球员名称 俱乐部名称
+ //使用选择加载
+ using var context = new chwContext();
+ var playerList = context.players.AsNoTracking().Select(
+ p=> new ShowIndex{
+ PlayerName=p.PlayerName,
+ ClubName=p.PlayerClud.ClubName
+ }
+ ).ToList();
+ ViewBag.playerList =playerList;
+ // var club = context.club.FirstOrDefault(c=>c.ClubId==1);
+ return View();
+
+
+
+
+
+
+
+ // List players = new List()
+ // {
+ // // new Players{ ID=19, Name="陈胜" },
+ // // new Players{ ID=20, Name="乘胜" },
+ // // new Players{ ID=23, Name="陈威" },
+ // // new Players{ ID=24, Name="凌晨" },
+ // // new Players{ ID=25, Name="韩城" },
+ // // new Players{ ID=26, Name="七九" }
+ // };
+
+ //
+
+
+
+
+
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Controllers/HomeController.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Controllers/HomeController.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..e3572404b317977324a581ea155f7a4c0030cfa5
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Controllers/HomeController.cs"
@@ -0,0 +1,54 @@
+using System.Diagnostics;
+using Microsoft.AspNetCore.Mvc;
+using CHW.Models;
+
+namespace CHW.Controllers;
+
+public class HomeController : Controller
+{
+ private readonly ILogger _logger;
+
+ public HomeController(ILogger logger)
+ {
+ _logger = logger;
+ }
+
+
+
+
+
+
+
+
+
+
+
+ public IActionResult Index()
+ {
+ return View();
+ }
+
+ public IActionResult Privacy()
+ {
+ return View();
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
+ public IActionResult Error()
+ {
+ return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/DATE/DeleteDate.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/DATE/DeleteDate.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..6cf0b3c78dc8135fbffa7a5468576d35a6e090ff
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/DATE/DeleteDate.cs"
@@ -0,0 +1,56 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+using CHW.Models;
+using Microsoft.EntityFrameworkCore;
+
+namespace CHW.DATE
+{
+ public static class DeleteDate
+ {
+ public static void Deleted()
+ {
+ using var context = new chwContext();
+ //先查询 到需要删除的数据 华楚 PlayerId = 10
+ // var shanchu = context.players.AsNoTracking().FirstOrDefault(p=>p.PlayerName == "华楚");
+ // var shanchu = context.players.Find(10);
+ // Console.WriteLine(shanchu.PlayerName);
+ //删除
+ // context.Remove(shanchu); //删除单个
+ // context.RemoveRange;//删除多个
+ //保存数据库中
+ // context.SaveChanges();
+
+
+
+
+ //删除巴西队 如果有其他表外键依赖于该表主键那么就会导致一个【级联删除】问题
+ // var afa = context.club.Find(2);
+ // context.Remove(afa);
+ // context.SaveChanges();
+
+ //软删除,在该表添加一个bool类型的字段isVisiable,当我的字段为true时,表示删除,false:表示已删除
+ //设置【软删除过滤器】剔除isVisiable=false,并让其不可见
+ System.Console.WriteLine("==============删除前==============");
+ var clubs = context.club.ToList();
+ foreach (var item in clubs)
+ {
+ global::System.Console.WriteLine(item.ClubName);
+ }
+
+ //删除巴西队
+ var ada = context.club.Find(2);
+ ada.IsAviliable =false;
+ context.SaveChanges();
+
+ System.Console.WriteLine("==============删除后==============");
+ var clubS = context.club.ToList();
+ foreach (var item in clubS)
+ {
+ global::System.Console.WriteLine(item.ClubName);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/DATE/chwContext.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/DATE/chwContext.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..513eaf36ce202b3fea0bfd1906a96f5c3445f222
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/DATE/chwContext.cs"
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using CHW.Models;
+using Microsoft.EntityFrameworkCore;
+namespace CHW.DATE
+{
+ public class chwContext :DbContext
+ {
+
+
+ public DbSet players{get;set;}
+
+ public DbSet league{get;set;}
+
+ public DbSet club{get;set;}
+
+ public DbSet ClubWthLeague{get;set;}
+
+ // public DbSet Student{get;set;}
+
+ // public DbSet Scores{get;set;}
+
+ // public DbSet Class{get;set;}
+
+ // public DbSet Course{get;set;}
+
+ protected override void OnConfiguring(DbContextOptionsBuilder builder)
+ {
+ builder.UseSqlServer("server=LAPTOP-E6D70ORO;uid=sa;pwd=123456;Database=EFC200210;TrustServerCertificate=True");
+ }
+
+ protected override void OnModelCreating(ModelBuilder modelBuilder)
+ {
+ //fluent api >数据注释>默认约定
+ // modelBuilder.Entity().HasKey("leagueNo");//主键
+ // modelBuilder.Entity().Property(l=>l.Desc).HasColumnName("简介");//列名
+ // modelBuilder.Entity().ToTable("mods");//生产数据库
+ // modelBuilder.Entity().Property(c=>c.Grade).HasDefaultValue("C");//默认值
+ // modelBuilder.Entity().Property(c=>c.CludName).HasMaxLength(200);//最大长度
+
+ //配置IsAviliable默认值为true
+ modelBuilder.Entity().Property(c=>c.IsAviliable).HasDefaultValue(true);
+
+ //设置软删除过滤器:如果IsAviliable字段为true,表示可查询,如果是false将查询不到数据
+ modelBuilder.Entity().HasQueryFilter(c=>c.IsAviliable==true);
+ }
+ }
+}
\ No newline at end of file
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/DATE/staticDATE.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/DATE/staticDATE.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..6dec0789bd2cc5249bf2c37193a904529ddbb504
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/DATE/staticDATE.cs"
@@ -0,0 +1,254 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using CHW.Models;
+using Microsoft.EntityFrameworkCore;
+
+namespace CHW.DATE
+{
+ //静态可以不需要实例化,直接调佣
+ public static class staticDATE
+ {
+
+
+ public static void Init()
+ {
+ //实例化数据库的上文:chwContext
+ using var context = new chwContext();
+ //确保数据库已创建
+ context.Database.EnsureCreated();
+ // context.clud.Any():检查club表中有没有数据,如果有,返回TRUE,否则返回false
+ if(!context.club.Any())
+ {
+ var clublist = new List()
+ {
+ new Club(){ClubName="阿根庭队",ClubLevel="S",ClubPlace="阿根庭"},
+ new Club(){ClubName="巴西队",ClubLevel="A",ClubPlace="巴西"},
+ new Club(){ClubName="西班牙队",ClubLevel="B",ClubPlace="西班牙"},
+ new Club(){ClubName="法国队",ClubLevel="S",ClubPlace="法国"},
+ new Club(){ClubName="中国队",ClubLevel="C",ClubPlace="中国"}
+ };
+
+ foreach(var item in clublist)
+ {
+ context.Add(item);//遍历添加到俱乐部到context,但此时并没有打开数据库
+ }
+
+ //将内存中的数据存放到数据库中
+ context.SaveChanges();
+ }
+
+ if(!context.players.Any())
+ {
+ var Playerslist = new List()
+ {
+ new Players(){ClubId=1,PlayerName="梅西"},
+ new Players(){ClubId=4,PlayerName="贝利"},
+ new Players(){ClubId=2,PlayerName="莫德里奇"},
+ new Players(){ClubId=1,PlayerName="大马丁"},
+ new Players(){ClubId=5,PlayerName="武磊"},
+ new Players(){ClubId=2,PlayerName="内马尔"},
+ new Players(){ClubId=4,PlayerName="姆巴佩"},
+ new Players(){ClubId=1,PlayerName="马拉多纳"},
+ new Players(){ClubId=3,PlayerName="C罗"}
+
+ };
+ context.AddRange(Playerslist);
+ context.SaveChanges();
+ }
+
+
+ if(!context.league.Any())
+ {
+ var leaguelist = new List()
+ {
+ new league(){LName="美洲杯",Desc="全球"},
+ new league(){LName="世界杯",Desc="美洲"}
+ };
+ context.AddRange(leaguelist);
+ context.SaveChanges();
+ }
+
+ if(!context.ClubWthLeague.Any())
+ {
+ var CludWthLeaguelist = new List()
+ //世界杯1,美洲杯2
+ {
+ new ClubWthLeague(){ClubId=1,CWLLeagueLeagueNo=1},
+ new ClubWthLeague(){ClubId=1,CWLLeagueLeagueNo=2},
+ new ClubWthLeague(){ClubId=2,CWLLeagueLeagueNo=1},
+ new ClubWthLeague(){ClubId=2,CWLLeagueLeagueNo=2},
+ new ClubWthLeague(){ClubId=3,CWLLeagueLeagueNo=2},
+ new ClubWthLeague(){ClubId=4,CWLLeagueLeagueNo=1},
+ new ClubWthLeague(){ClubId=5,CWLLeagueLeagueNo=2}
+ };
+ context.AddRange(CludWthLeaguelist);
+ context.SaveChanges();
+ }
+ }
+ //添加数据
+ public static void AddDate()
+ {
+ using var context = new chwContext();
+ //添加球员
+ //添加球员华楚 在 中国队
+ //1.中国队
+ // var clubmd =context.club.Where(c=>c.ClubName=="c").Single();
+ // System.Console.WriteLine($"{clubmd.ClubId} {clubmd.ClubName}");
+ // var playerss = new Players(){PlayerName="华楚",PlayerClud=clubmd};
+ // context.Add(playerss);
+ // context.SaveChanges();
+
+
+
+ //简单查询
+ // 1.查询所有俱乐部
+ // ToList():将DbSet转为泛型集合
+ // var clubs = context.club.ToList();
+ // foreach (var item in clubs)
+ // {
+ // System.Console.WriteLine($"{item.ClubId} {item.ClubName} {item.ClubLevel}");
+ // }
+
+
+ // 查询所有球员
+ // var playerss= context.players.ToList();
+ // //遍历输出
+ // foreach (var item in playerss)
+ // {
+ // System.Console.WriteLine($"{item.PlayerId} {item.ClubId} {item.PlayerName}");
+ // }
+
+
+ //条件查询
+ // where():接受Lambda表达式
+ //查询球员为 ClubId=4的个人信息
+ var players = context.players.Where(p=>p.ClubId==4 ).ToList();
+ // var players = context.players.Where(p=>p.ClubId==4 && p.PlayerId>6).ToList();
+ foreach (var item in players)
+ {
+ System.Console.WriteLine($"{item.PlayerId} {item.ClubId} {item.PlayerName}");
+ }
+
+
+ //条件查询
+ //查询球员为 武磊的个人信息
+ // where():接受Lambda表达式
+ var Players = context.players.Where(p=>p.PlayerName=="武磊").ToList();
+ foreach (var item in Players)
+ {
+ System.Console.WriteLine($"{item.PlayerId} {item.ClubId} {item.PlayerName}");
+ }
+
+
+
+
+
+
+
+ //3.查询球员名称中包含“鹏”的球员,不会
+ // 条件查询
+ // where():接受Lambda表达式
+ // var pLayers = context.players.Where(p=>p.Name=="武磊").ToList();
+ // foreach (var item in pLayers)
+ // {
+ // System.Console.WriteLine($"{item.ID} {item.CludId} {item.Name}");
+ // }
+
+
+ // var club = context.clud.Where(c=>c.CludId==4).ToList();
+ // foreach (var item in club)
+ // {
+ // System.Console.WriteLine($"{item.CludId} {item.CludName} {item.Grade}");
+ // }
+
+
+
+ // 找出陈萨大所有球员
+ // Single:查找单条数据,如果没找到,那么报错
+ // SingleOrDefault:查找单条数据,如果没找到,会使用默认值(NULL)
+ // var clubmd = context.clud.SingleOrDefault(c=>c.CludName=="陈萨大");
+ // System.Console.WriteLine($"{clubmd.CludId} {clubmd.CludName}");
+ // var players =context.players.Where(c=>c.CludId==clubmd.CludId).ToList();
+ // foreach (var item in players)
+ // {
+ // global::System.Console.WriteLine($"{item.CludId} {clubmd.CludName} {item.Name}");
+ // }
+
+
+ //修改俱乐部名字
+ // var clubmd = context.clud.AsTracking().SingleOrDefault(c=>c.CludName=="陈萨小");
+ // System.Console.WriteLine($"修改前{clubmd.CludName}");
+ // clubmd.CludName ="陈萨大";
+ // System.Console.WriteLine($"修改后{clubmd.CludName}");
+ // context.SaveChanges();
+
+
+
+
+
+ //找出陈萨大所有球员
+ // AsNoTracking():不追踪变化,查询效率会大大提高,任何增删改查数据变化都不会保存在数据库(只用于查询)
+ // AsTracking():启用模型跟踪
+ //需要外键,外键没连
+ //预加载:通过Include(c=c.导航属性),ThenInclude(c=c.导航属性)组合实现多表查询,导航外键
+ // var clubmd = context.clud.AsNoTracking().Include(c=>c.导航属性).SingleOrDefault(c=>c.CludName=="陈萨大");
+ // foreach (var item in clubmd.导航属性)
+ // {
+ // global::System.Console.WriteLine($"{item.Name}");
+ // }
+
+ //武磊打的是世界杯还是美洲杯
+ //需要外键,外键没连
+ #region 显示加载
+
+ //内马尔所在的俱乐部
+ //预加载:会过多的加载到不需要的表
+ //显示加载Load():引用Reference 集合Collection
+ // var nme = context.players.SingleOrDefault(p=>p.Name=="内马尔");
+
+ // context.Entry(nme).Reference(n=>n.PlayerClub).Load();
+ // System.Console.WriteLine(nme.PlayerClub.ClubName);
+
+ //查询阿根廷的所有球员
+ // var players = context.clud.SingleOrDefault(c=>c.CludName=="阿根廷");
+ // context.Entry(players).Collection(p=>p.ClubWithPlayers).Load();
+ // foreach (var item in players.ClubWithPlayers) //需要外键。但我没写,我写学生表作业上,俱乐部表没写
+ // {
+ // global::System.Console.WriteLine(item.PlayerName);
+ // }
+
+
+ #endregion
+
+
+ #region 选择性加载
+ // var player = context.players.AsNoTracking().Select(
+ // p =>new{
+ // p.Name,
+ // p.ID
+ // }
+ // ).SingleOrDefault(p=>p.Name=="武磊");
+ // System.Console.WriteLine(player.ID);
+
+ #endregion
+
+ //排序OrderBy(Decending 逆序) skip 跳过几页()take 查几页():封页查询
+ // var playere =context.players.OrderBy(p=>p.ID).ThenByDescending(p=>p.CludId)
+ // .Skip(2).Take(2)
+ // .ToList();
+ // foreach (var item in playere)
+ // {
+ // System.Console.WriteLine($"{item.ID} {item.CludId} {item.Name}");
+ // }
+ }
+ }
+ // public class GetClubName
+ // {
+ // public int PlayerId { get; set; }
+ // public string PlayerName { get; set; }
+ // public string ClubName { get; set; }
+ // }
+
+}
\ No newline at end of file
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222044855_first.Designer.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222044855_first.Designer.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..71d1a9f15f7688efbe8a02201acb3a22ef709ef0
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222044855_first.Designer.cs"
@@ -0,0 +1,46 @@
+//
+using CHW.DATE;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ [DbContext(typeof(chwContext))]
+ [Migration("20221222044855_first")]
+ partial class first
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CHW.Models.Players", b =>
+ {
+ b.Property("PlayersId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("PlayersId"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("PlayersId");
+
+ b.ToTable("players");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222044855_first.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222044855_first.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..f561214b8d2ecfd3452cb5ab193480f7c778af78
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222044855_first.cs"
@@ -0,0 +1,34 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ ///
+ public partial class first : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "players",
+ columns: table => new
+ {
+ PlayersId = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ Name = table.Column(type: "nvarchar(max)", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_players", x => x.PlayersId);
+ });
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "players");
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222051837_second.Designer.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222051837_second.Designer.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..aa5d5d0005a50f080a3f52b41f521e1f5d6da399
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222051837_second.Designer.cs"
@@ -0,0 +1,46 @@
+//
+using CHW.DATE;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ [DbContext(typeof(chwContext))]
+ [Migration("20221222051837_second")]
+ partial class second
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CHW.Models.Players", b =>
+ {
+ b.Property("ID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("ID");
+
+ b.ToTable("players");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222051837_second.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222051837_second.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..cdf510cfe074d5d9fab1ff50d9c9d93b16483f3e
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222051837_second.cs"
@@ -0,0 +1,28 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ ///
+ public partial class second : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.RenameColumn(
+ name: "PlayersId",
+ table: "players",
+ newName: "ID");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.RenameColumn(
+ name: "ID",
+ table: "players",
+ newName: "PlayersId");
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222055623_thirdly.Designer.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222055623_thirdly.Designer.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..0307a746310b9926ba1ab5821864f1581893ce98
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222055623_thirdly.Designer.cs"
@@ -0,0 +1,46 @@
+//
+using CHW.DATE;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ [DbContext(typeof(chwContext))]
+ [Migration("20221222055623_thirdly")]
+ partial class thirdly
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CHW.Models.Players", b =>
+ {
+ b.Property("ID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("ID");
+
+ b.ToTable("Players");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222055623_thirdly.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222055623_thirdly.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..4d181306cd17b6b666e62772fd5c4fa7c62a6467
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222055623_thirdly.cs"
@@ -0,0 +1,44 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ ///
+ public partial class thirdly : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropPrimaryKey(
+ name: "PK_players",
+ table: "players");
+
+ migrationBuilder.RenameTable(
+ name: "players",
+ newName: "Players");
+
+ migrationBuilder.AddPrimaryKey(
+ name: "PK_Players",
+ table: "Players",
+ column: "ID");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropPrimaryKey(
+ name: "PK_Players",
+ table: "Players");
+
+ migrationBuilder.RenameTable(
+ name: "Players",
+ newName: "players");
+
+ migrationBuilder.AddPrimaryKey(
+ name: "PK_players",
+ table: "players",
+ column: "ID");
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222060648_fifth.Designer.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222060648_fifth.Designer.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..d144d3a74b2c395de2ab167f663b0012a3f315b2
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222060648_fifth.Designer.cs"
@@ -0,0 +1,66 @@
+//
+using CHW.DATE;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ [DbContext(typeof(chwContext))]
+ [Migration("20221222060648_fifth")]
+ partial class fifth
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CHW.Models.Players", b =>
+ {
+ b.Property("ID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("ID");
+
+ b.ToTable("players");
+ });
+
+ modelBuilder.Entity("CHW.Models.league", b =>
+ {
+ b.Property("leagueId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("leagueId"));
+
+ b.Property("Desc")
+ .HasColumnType("int");
+
+ b.Property("leagueType")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("leagueId");
+
+ b.ToTable("league");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222060648_fifth.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222060648_fifth.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..7d5a8aa3243da30c3131958e327b695ad2fc1e98
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222060648_fifth.cs"
@@ -0,0 +1,61 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ ///
+ public partial class fifth : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropPrimaryKey(
+ name: "PK_Players",
+ table: "Players");
+
+ migrationBuilder.RenameTable(
+ name: "Players",
+ newName: "players");
+
+ migrationBuilder.AddPrimaryKey(
+ name: "PK_players",
+ table: "players",
+ column: "ID");
+
+ migrationBuilder.CreateTable(
+ name: "league",
+ columns: table => new
+ {
+ leagueId = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ leagueType = table.Column(type: "nvarchar(max)", nullable: false),
+ Desc = table.Column(type: "int", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_league", x => x.leagueId);
+ });
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "league");
+
+ migrationBuilder.DropPrimaryKey(
+ name: "PK_players",
+ table: "players");
+
+ migrationBuilder.RenameTable(
+ name: "players",
+ newName: "Players");
+
+ migrationBuilder.AddPrimaryKey(
+ name: "PK_Players",
+ table: "Players",
+ column: "ID");
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222061209_six.Designer.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222061209_six.Designer.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..d81ee421d0bdb2a337a74e9c46b1ba56b7ef706f
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222061209_six.Designer.cs"
@@ -0,0 +1,82 @@
+//
+using CHW.DATE;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ [DbContext(typeof(chwContext))]
+ [Migration("20221222061209_six")]
+ partial class six
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CHW.Models.Clud", b =>
+ {
+ b.Property("CludId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CludId"));
+
+ b.Property("CludName")
+ .HasColumnType("int");
+
+ b.HasKey("CludId");
+
+ b.ToTable("clud");
+ });
+
+ modelBuilder.Entity("CHW.Models.Players", b =>
+ {
+ b.Property("ID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("ID");
+
+ b.ToTable("players");
+ });
+
+ modelBuilder.Entity("CHW.Models.league", b =>
+ {
+ b.Property("leagueId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("leagueId"));
+
+ b.Property("Desc")
+ .HasColumnType("int");
+
+ b.Property("leagueType")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("leagueId");
+
+ b.ToTable("league");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222061209_six.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222061209_six.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..52e707774b649c828eb5b87eb1945645ffd971f5
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221222061209_six.cs"
@@ -0,0 +1,34 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ ///
+ public partial class six : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "clud",
+ columns: table => new
+ {
+ CludId = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ CludName = table.Column(type: "int", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_clud", x => x.CludId);
+ });
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "clud");
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223040249_seven.Designer.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223040249_seven.Designer.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..e4f7ceafeafa6ad2cf109be7c68a73137338058b
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223040249_seven.Designer.cs"
@@ -0,0 +1,83 @@
+//
+using System;
+using CHW.DATE;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ [DbContext(typeof(chwContext))]
+ [Migration("20221223040249_seven")]
+ partial class seven
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CHW.Models.Clud", b =>
+ {
+ b.Property("CludId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CludId"));
+
+ b.Property("CludName")
+ .HasColumnType("int");
+
+ b.HasKey("CludId");
+
+ b.ToTable("clud");
+ });
+
+ modelBuilder.Entity("CHW.Models.Players", b =>
+ {
+ b.Property("ID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("ID");
+
+ b.ToTable("players");
+ });
+
+ modelBuilder.Entity("CHW.Models.league", b =>
+ {
+ b.Property("leagueNo")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("leagueNo"));
+
+ b.Property("Desc")
+ .HasColumnType("int");
+
+ b.Property("leagueType")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("leagueNo");
+
+ b.ToTable("league");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223040249_seven.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223040249_seven.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..fbf17e1f8c0558077092e0a2d05d92eb2b2544b4
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223040249_seven.cs"
@@ -0,0 +1,46 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ ///
+ public partial class seven : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.RenameColumn(
+ name: "leagueId",
+ table: "league",
+ newName: "leagueNo");
+
+ migrationBuilder.AlterColumn(
+ name: "Desc",
+ table: "league",
+ type: "int",
+ nullable: true,
+ oldClrType: typeof(int),
+ oldType: "int");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.RenameColumn(
+ name: "leagueNo",
+ table: "league",
+ newName: "leagueId");
+
+ migrationBuilder.AlterColumn(
+ name: "Desc",
+ table: "league",
+ type: "int",
+ nullable: false,
+ defaultValue: 0,
+ oldClrType: typeof(int),
+ oldType: "int",
+ oldNullable: true);
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223043233_eight.Designer.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223043233_eight.Designer.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..9ab7eeb1ee2043036d8f74faf4b452b9786159da
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223043233_eight.Designer.cs"
@@ -0,0 +1,86 @@
+//
+using System;
+using CHW.DATE;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ [DbContext(typeof(chwContext))]
+ [Migration("20221223043233_eight")]
+ partial class eight
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CHW.Models.Clud", b =>
+ {
+ b.Property("CludId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CludId"));
+
+ b.Property("CludName")
+ .HasColumnType("int");
+
+ b.HasKey("CludId");
+
+ b.ToTable("clud");
+ });
+
+ modelBuilder.Entity("CHW.Models.Players", b =>
+ {
+ b.Property("ID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("ID");
+
+ b.ToTable("players");
+ });
+
+ modelBuilder.Entity("CHW.Models.league", b =>
+ {
+ b.Property("leagueNo")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("联赛ID");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("leagueNo"));
+
+ b.Property("Desc")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("int");
+
+ b.Property("leagueType")
+ .IsRequired()
+ .HasColumnType("varchar(200)");
+
+ b.HasKey("leagueNo");
+
+ b.ToTable("league");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223043233_eight.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223043233_eight.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..3c1e7f3b063c943d46e7e6863d61a998deae22f9
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223043233_eight.cs"
@@ -0,0 +1,64 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ ///
+ public partial class eight : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.RenameColumn(
+ name: "leagueNo",
+ table: "league",
+ newName: "联赛ID");
+
+ migrationBuilder.AlterColumn(
+ name: "leagueType",
+ table: "league",
+ type: "varchar(200)",
+ nullable: false,
+ oldClrType: typeof(string),
+ oldType: "nvarchar(max)");
+
+ migrationBuilder.AlterColumn(
+ name: "Desc",
+ table: "league",
+ type: "int",
+ maxLength: 500,
+ nullable: false,
+ defaultValue: 0,
+ oldClrType: typeof(int),
+ oldType: "int",
+ oldNullable: true);
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.RenameColumn(
+ name: "联赛ID",
+ table: "league",
+ newName: "leagueNo");
+
+ migrationBuilder.AlterColumn(
+ name: "leagueType",
+ table: "league",
+ type: "nvarchar(max)",
+ nullable: false,
+ oldClrType: typeof(string),
+ oldType: "varchar(200)");
+
+ migrationBuilder.AlterColumn(
+ name: "Desc",
+ table: "league",
+ type: "int",
+ nullable: true,
+ oldClrType: typeof(int),
+ oldType: "int",
+ oldMaxLength: 500);
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223043647_nine.Designer.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223043647_nine.Designer.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..87a11edc490713f84b353d2f47eff93a2aba0eab
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223043647_nine.Designer.cs"
@@ -0,0 +1,85 @@
+//
+using CHW.DATE;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ [DbContext(typeof(chwContext))]
+ [Migration("20221223043647_nine")]
+ partial class nine
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CHW.Models.Clud", b =>
+ {
+ b.Property("CludId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CludId"));
+
+ b.Property("CludName")
+ .HasColumnType("int");
+
+ b.HasKey("CludId");
+
+ b.ToTable("clud");
+ });
+
+ modelBuilder.Entity("CHW.Models.Players", b =>
+ {
+ b.Property("ID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("ID");
+
+ b.ToTable("players");
+ });
+
+ modelBuilder.Entity("CHW.Models.league", b =>
+ {
+ b.Property("leagueNo")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("联赛ID");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("leagueNo"));
+
+ b.Property("Desc")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("nvarchar(500)");
+
+ b.Property("leagueType")
+ .IsRequired()
+ .HasColumnType("varchar(200)");
+
+ b.HasKey("leagueNo");
+
+ b.ToTable("league");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223043647_nine.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223043647_nine.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..85bbc96901ce778333892132b8c2d14be1d13db0
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221223043647_nine.cs"
@@ -0,0 +1,38 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ ///
+ public partial class nine : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AlterColumn(
+ name: "Desc",
+ table: "league",
+ type: "nvarchar(500)",
+ maxLength: 500,
+ nullable: false,
+ oldClrType: typeof(int),
+ oldType: "int",
+ oldMaxLength: 500);
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AlterColumn(
+ name: "Desc",
+ table: "league",
+ type: "int",
+ maxLength: 500,
+ nullable: false,
+ oldClrType: typeof(string),
+ oldType: "nvarchar(500)",
+ oldMaxLength: 500);
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225075430_ten.Designer.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225075430_ten.Designer.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..a737b31f7fb9c341a71682e2c62faf94211932ff
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225075430_ten.Designer.cs"
@@ -0,0 +1,85 @@
+//
+using CHW.DATE;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ [DbContext(typeof(chwContext))]
+ [Migration("20221225075430_ten")]
+ partial class ten
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CHW.Models.Clud", b =>
+ {
+ b.Property("CludId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CludId"));
+
+ b.Property("CludName")
+ .HasColumnType("int");
+
+ b.HasKey("CludId");
+
+ b.ToTable("clud");
+ });
+
+ modelBuilder.Entity("CHW.Models.Players", b =>
+ {
+ b.Property("ID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("ID");
+
+ b.ToTable("players");
+ });
+
+ modelBuilder.Entity("CHW.Models.league", b =>
+ {
+ b.Property("leagueNo")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("联赛ID");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("leagueNo"));
+
+ b.Property("Desc")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("nvarchar(500)");
+
+ b.Property("leagueType")
+ .IsRequired()
+ .HasColumnType("varchar(200)");
+
+ b.HasKey("leagueNo");
+
+ b.ToTable("league");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225075430_ten.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225075430_ten.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..fd42fe260684166f97e2ef2395af9988c1d71c18
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225075430_ten.cs"
@@ -0,0 +1,22 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ ///
+ public partial class ten : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225075629_eleven.Designer.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225075629_eleven.Designer.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..41a6d47566a40de98fb7d274934c187b1bd38d80
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225075629_eleven.Designer.cs"
@@ -0,0 +1,103 @@
+//
+using CHW.DATE;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ [DbContext(typeof(chwContext))]
+ [Migration("20221225075629_eleven")]
+ partial class eleven
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CHW.Models.Clud", b =>
+ {
+ b.Property("CludId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CludId"));
+
+ b.Property("CludName")
+ .HasColumnType("int");
+
+ b.HasKey("CludId");
+
+ b.ToTable("clud");
+ });
+
+ modelBuilder.Entity("CHW.Models.Players", b =>
+ {
+ b.Property("ID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("ID");
+
+ b.ToTable("players");
+ });
+
+ modelBuilder.Entity("CHW.Models.league", b =>
+ {
+ b.Property("leagueNo")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("联赛ID");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("leagueNo"));
+
+ b.Property("Desc")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("nvarchar(500)")
+ .HasColumnName("简介");
+
+ b.Property("leagueType")
+ .IsRequired()
+ .HasColumnType("varchar(200)");
+
+ b.HasKey("leagueNo");
+
+ b.ToTable("league");
+ });
+
+ modelBuilder.Entity("CHW.Models.mods", b =>
+ {
+ b.Property("MID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("MID"));
+
+ b.Property("Mname")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("MID");
+
+ b.ToTable("mods", (string)null);
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225075629_eleven.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225075629_eleven.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..c8e8cae27ed1646b954c22f01f483d366f1bb033
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225075629_eleven.cs"
@@ -0,0 +1,44 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ ///
+ public partial class eleven : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.RenameColumn(
+ name: "Desc",
+ table: "league",
+ newName: "简介");
+
+ migrationBuilder.CreateTable(
+ name: "mods",
+ columns: table => new
+ {
+ MID = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ Mname = table.Column(type: "nvarchar(max)", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_mods", x => x.MID);
+ });
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "mods");
+
+ migrationBuilder.RenameColumn(
+ name: "简介",
+ table: "league",
+ newName: "Desc");
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225083233_twelve.Designer.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225083233_twelve.Designer.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..961d50bbe28abd5f433634502f81482b649808df
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225083233_twelve.Designer.cs"
@@ -0,0 +1,193 @@
+//
+using CHW.DATE;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ [DbContext(typeof(chwContext))]
+ [Migration("20221225083233_twelve")]
+ partial class twelve
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CHW.Models.CLASS", b =>
+ {
+ b.Property("classID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("classID"));
+
+ b.Property("class_title")
+ .HasColumnType("int");
+
+ b.HasKey("classID");
+
+ b.ToTable("Class");
+ });
+
+ modelBuilder.Entity("CHW.Models.Clud", b =>
+ {
+ b.Property("CludId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CludId"));
+
+ b.Property("CludName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("Grade")
+ .IsRequired()
+ .ValueGeneratedOnAdd()
+ .HasColumnType("nvarchar(max)")
+ .HasDefaultValue("C");
+
+ b.HasKey("CludId");
+
+ b.ToTable("clud");
+ });
+
+ modelBuilder.Entity("CHW.Models.Players", b =>
+ {
+ b.Property("ID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("ID");
+
+ b.ToTable("players");
+ });
+
+ modelBuilder.Entity("CHW.Models.course", b =>
+ {
+ b.Property("courseID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("courseID"));
+
+ b.Property("course_title")
+ .IsRequired()
+ .HasColumnType("varchar(20)");
+
+ b.Property("credit")
+ .HasColumnType("int");
+
+ b.HasKey("courseID");
+
+ b.ToTable("Course");
+ });
+
+ modelBuilder.Entity("CHW.Models.league", b =>
+ {
+ b.Property("leagueNo")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("联赛ID");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("leagueNo"));
+
+ b.Property("Desc")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("nvarchar(500)")
+ .HasColumnName("简介");
+
+ b.Property("leagueType")
+ .IsRequired()
+ .HasColumnType("varchar(200)");
+
+ b.HasKey("leagueNo");
+
+ b.ToTable("league");
+ });
+
+ modelBuilder.Entity("CHW.Models.mods", b =>
+ {
+ b.Property("MID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("MID"));
+
+ b.Property("Mname")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("MID");
+
+ b.ToTable("mods", (string)null);
+ });
+
+ modelBuilder.Entity("CHW.Models.score", b =>
+ {
+ b.Property("scoreID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("scoreID"));
+
+ b.Property("Score")
+ .HasColumnType("int");
+
+ b.Property("courseID")
+ .HasColumnType("int");
+
+ b.Property("studentID")
+ .HasColumnType("int");
+
+ b.HasKey("scoreID");
+
+ b.ToTable("Scores");
+ });
+
+ modelBuilder.Entity("CHW.Models.student", b =>
+ {
+ b.Property("studentID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("studentID"));
+
+ b.Property("classID")
+ .HasColumnType("int");
+
+ b.Property("studentGender")
+ .IsRequired()
+ .HasColumnType("varchar(50)");
+
+ b.Property("studentName")
+ .IsRequired()
+ .HasColumnType("varchar(200)");
+
+ b.HasKey("studentID");
+
+ b.ToTable("Student");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225083233_twelve.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225083233_twelve.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..4e60ef024f4d598b26d1d54390431892869361e5
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225083233_twelve.cs"
@@ -0,0 +1,116 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ ///
+ public partial class twelve : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AlterColumn(
+ name: "CludName",
+ table: "clud",
+ type: "nvarchar(200)",
+ maxLength: 200,
+ nullable: false,
+ oldClrType: typeof(int),
+ oldType: "int");
+
+ migrationBuilder.AddColumn(
+ name: "Grade",
+ table: "clud",
+ type: "nvarchar(max)",
+ nullable: false,
+ defaultValue: "C");
+
+ migrationBuilder.CreateTable(
+ name: "Class",
+ columns: table => new
+ {
+ classID = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ classtitle = table.Column(name: "class_title", type: "int", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Class", x => x.classID);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Course",
+ columns: table => new
+ {
+ courseID = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ coursetitle = table.Column(name: "course_title", type: "varchar(20)", nullable: false),
+ credit = table.Column(type: "int", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Course", x => x.courseID);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Scores",
+ columns: table => new
+ {
+ scoreID = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ studentID = table.Column(type: "int", nullable: false),
+ courseID = table.Column(type: "int", nullable: false),
+ Score = table.Column(type: "int", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Scores", x => x.scoreID);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Student",
+ columns: table => new
+ {
+ studentID = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ classID = table.Column(type: "int", nullable: false),
+ studentName = table.Column(type: "varchar(200)", nullable: false),
+ studentGender = table.Column(type: "varchar(50)", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Student", x => x.studentID);
+ });
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "Class");
+
+ migrationBuilder.DropTable(
+ name: "Course");
+
+ migrationBuilder.DropTable(
+ name: "Scores");
+
+ migrationBuilder.DropTable(
+ name: "Student");
+
+ migrationBuilder.DropColumn(
+ name: "Grade",
+ table: "clud");
+
+ migrationBuilder.AlterColumn(
+ name: "CludName",
+ table: "clud",
+ type: "int",
+ nullable: false,
+ oldClrType: typeof(string),
+ oldType: "nvarchar(200)",
+ oldMaxLength: 200);
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092053_thirteen.Designer.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092053_thirteen.Designer.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..0c87be7c8ef0beef3c3877bf5d3fb6d82db6988f
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092053_thirteen.Designer.cs"
@@ -0,0 +1,255 @@
+//
+using System;
+using CHW.DATE;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ [DbContext(typeof(chwContext))]
+ [Migration("20221225092053_thirteen")]
+ partial class thirteen
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CHW.Models.CLASS", b =>
+ {
+ b.Property("classID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("classID"));
+
+ b.Property("class_title")
+ .IsRequired()
+ .HasColumnType("varchar(20)");
+
+ b.HasKey("classID");
+
+ b.ToTable("Class");
+ });
+
+ modelBuilder.Entity("CHW.Models.Clud", b =>
+ {
+ b.Property("CludId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CludId"));
+
+ b.Property("CludName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("Grade")
+ .IsRequired()
+ .ValueGeneratedOnAdd()
+ .HasColumnType("nvarchar(max)")
+ .HasDefaultValue("C");
+
+ b.HasKey("CludId");
+
+ b.ToTable("clud");
+ });
+
+ modelBuilder.Entity("CHW.Models.Players", b =>
+ {
+ b.Property("ID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("ID");
+
+ b.ToTable("players");
+ });
+
+ modelBuilder.Entity("CHW.Models.course", b =>
+ {
+ b.Property("courseID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("courseID"));
+
+ b.Property("course_title")
+ .IsRequired()
+ .HasColumnType("varchar(20)");
+
+ b.Property("credit")
+ .HasColumnType("int");
+
+ b.HasKey("courseID");
+
+ b.ToTable("Course");
+ });
+
+ modelBuilder.Entity("CHW.Models.league", b =>
+ {
+ b.Property("leagueNo")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("联赛ID");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("leagueNo"));
+
+ b.Property("Desc")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("nvarchar(500)")
+ .HasColumnName("简介");
+
+ b.Property("leagueType")
+ .IsRequired()
+ .HasColumnType("varchar(200)");
+
+ b.HasKey("leagueNo");
+
+ b.ToTable("league");
+ });
+
+ modelBuilder.Entity("CHW.Models.mods", b =>
+ {
+ b.Property("MID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("MID"));
+
+ b.Property("Mname")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("MID");
+
+ b.ToTable("mods", (string)null);
+ });
+
+ modelBuilder.Entity("CHW.Models.score", b =>
+ {
+ b.Property("scoreID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("scoreID"));
+
+ b.Property("Score")
+ .HasColumnType("int");
+
+ b.Property("courseID")
+ .HasColumnType("int");
+
+ b.Property("studentID")
+ .HasColumnType("int");
+
+ b.HasKey("scoreID");
+
+ b.HasIndex("courseID");
+
+ b.HasIndex("studentID");
+
+ b.ToTable("Scores");
+ });
+
+ modelBuilder.Entity("CHW.Models.student", b =>
+ {
+ b.Property("studentID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("studentID"));
+
+ b.Property("classID")
+ .HasColumnType("int");
+
+ b.Property("studentGender")
+ .IsRequired()
+ .HasColumnType("varchar(50)");
+
+ b.Property("studentID1")
+ .HasColumnType("int");
+
+ b.Property("studentName")
+ .IsRequired()
+ .HasColumnType("varchar(200)");
+
+ b.HasKey("studentID");
+
+ b.HasIndex("classID");
+
+ b.HasIndex("studentID1");
+
+ b.ToTable("Student");
+ });
+
+ modelBuilder.Entity("CHW.Models.score", b =>
+ {
+ b.HasOne("CHW.Models.course", "score_course")
+ .WithMany("courseWithscore")
+ .HasForeignKey("courseID")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CHW.Models.student", "score_student")
+ .WithMany()
+ .HasForeignKey("studentID")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("score_course");
+
+ b.Navigation("score_student");
+ });
+
+ modelBuilder.Entity("CHW.Models.student", b =>
+ {
+ b.HasOne("CHW.Models.CLASS", "studentClass")
+ .WithMany("Classwithstudent")
+ .HasForeignKey("classID")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CHW.Models.student", null)
+ .WithMany("studentWithscore")
+ .HasForeignKey("studentID1");
+
+ b.Navigation("studentClass");
+ });
+
+ modelBuilder.Entity("CHW.Models.CLASS", b =>
+ {
+ b.Navigation("Classwithstudent");
+ });
+
+ modelBuilder.Entity("CHW.Models.course", b =>
+ {
+ b.Navigation("courseWithscore");
+ });
+
+ modelBuilder.Entity("CHW.Models.student", b =>
+ {
+ b.Navigation("studentWithscore");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092053_thirteen.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092053_thirteen.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..39f178fe6253ef263a7cb7825fc184fd24ba7f61
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092053_thirteen.cs"
@@ -0,0 +1,127 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ ///
+ public partial class thirteen : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AddColumn(
+ name: "studentID1",
+ table: "Student",
+ type: "int",
+ nullable: true);
+
+ migrationBuilder.AlterColumn(
+ name: "class_title",
+ table: "Class",
+ type: "varchar(20)",
+ nullable: false,
+ oldClrType: typeof(int),
+ oldType: "int");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Student_classID",
+ table: "Student",
+ column: "classID");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Student_studentID1",
+ table: "Student",
+ column: "studentID1");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Scores_courseID",
+ table: "Scores",
+ column: "courseID");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Scores_studentID",
+ table: "Scores",
+ column: "studentID");
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_Scores_Course_courseID",
+ table: "Scores",
+ column: "courseID",
+ principalTable: "Course",
+ principalColumn: "courseID",
+ onDelete: ReferentialAction.Cascade);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_Scores_Student_studentID",
+ table: "Scores",
+ column: "studentID",
+ principalTable: "Student",
+ principalColumn: "studentID",
+ onDelete: ReferentialAction.Cascade);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_Student_Class_classID",
+ table: "Student",
+ column: "classID",
+ principalTable: "Class",
+ principalColumn: "classID",
+ onDelete: ReferentialAction.Cascade);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_Student_Student_studentID1",
+ table: "Student",
+ column: "studentID1",
+ principalTable: "Student",
+ principalColumn: "studentID");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_Scores_Course_courseID",
+ table: "Scores");
+
+ migrationBuilder.DropForeignKey(
+ name: "FK_Scores_Student_studentID",
+ table: "Scores");
+
+ migrationBuilder.DropForeignKey(
+ name: "FK_Student_Class_classID",
+ table: "Student");
+
+ migrationBuilder.DropForeignKey(
+ name: "FK_Student_Student_studentID1",
+ table: "Student");
+
+ migrationBuilder.DropIndex(
+ name: "IX_Student_classID",
+ table: "Student");
+
+ migrationBuilder.DropIndex(
+ name: "IX_Student_studentID1",
+ table: "Student");
+
+ migrationBuilder.DropIndex(
+ name: "IX_Scores_courseID",
+ table: "Scores");
+
+ migrationBuilder.DropIndex(
+ name: "IX_Scores_studentID",
+ table: "Scores");
+
+ migrationBuilder.DropColumn(
+ name: "studentID1",
+ table: "Student");
+
+ migrationBuilder.AlterColumn(
+ name: "class_title",
+ table: "Class",
+ type: "int",
+ nullable: false,
+ oldClrType: typeof(string),
+ oldType: "varchar(20)");
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092317_foveteen.Designer.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092317_foveteen.Designer.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..ee808960e8cff0095df1c8d798a2e00d8d44f3a4
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092317_foveteen.Designer.cs"
@@ -0,0 +1,238 @@
+//
+using System;
+using CHW.DATE;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ [DbContext(typeof(chwContext))]
+ [Migration("20221225092317_foveteen")]
+ partial class foveteen
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CHW.Models.CLASS", b =>
+ {
+ b.Property("classID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("classID"));
+
+ b.Property("class_title")
+ .IsRequired()
+ .HasColumnType("varchar(20)");
+
+ b.HasKey("classID");
+
+ b.ToTable("Class");
+ });
+
+ modelBuilder.Entity("CHW.Models.Clud", b =>
+ {
+ b.Property("CludId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CludId"));
+
+ b.Property("CludName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("nvarchar(200)");
+
+ b.Property("Grade")
+ .IsRequired()
+ .ValueGeneratedOnAdd()
+ .HasColumnType("nvarchar(max)")
+ .HasDefaultValue("C");
+
+ b.HasKey("CludId");
+
+ b.ToTable("Clud");
+ });
+
+ modelBuilder.Entity("CHW.Models.course", b =>
+ {
+ b.Property("courseID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("courseID"));
+
+ b.Property("course_title")
+ .IsRequired()
+ .HasColumnType("varchar(20)");
+
+ b.Property("credit")
+ .HasColumnType("int");
+
+ b.HasKey("courseID");
+
+ b.ToTable("Course");
+ });
+
+ modelBuilder.Entity("CHW.Models.league", b =>
+ {
+ b.Property("leagueNo")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasColumnName("联赛ID");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("leagueNo"));
+
+ b.Property("Desc")
+ .IsRequired()
+ .HasMaxLength(500)
+ .HasColumnType("nvarchar(500)")
+ .HasColumnName("简介");
+
+ b.Property("leagueType")
+ .IsRequired()
+ .HasColumnType("varchar(200)");
+
+ b.HasKey("leagueNo");
+
+ b.ToTable("league");
+ });
+
+ modelBuilder.Entity("CHW.Models.mods", b =>
+ {
+ b.Property("MID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("MID"));
+
+ b.Property("Mname")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("MID");
+
+ b.ToTable("mods", (string)null);
+ });
+
+ modelBuilder.Entity("CHW.Models.score", b =>
+ {
+ b.Property("scoreID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("scoreID"));
+
+ b.Property("Score")
+ .HasColumnType("int");
+
+ b.Property("courseID")
+ .HasColumnType("int");
+
+ b.Property("studentID")
+ .HasColumnType("int");
+
+ b.HasKey("scoreID");
+
+ b.HasIndex("courseID");
+
+ b.HasIndex("studentID");
+
+ b.ToTable("Scores");
+ });
+
+ modelBuilder.Entity("CHW.Models.student", b =>
+ {
+ b.Property("studentID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("studentID"));
+
+ b.Property("classID")
+ .HasColumnType("int");
+
+ b.Property("studentGender")
+ .IsRequired()
+ .HasColumnType("varchar(50)");
+
+ b.Property("studentID1")
+ .HasColumnType("int");
+
+ b.Property("studentName")
+ .IsRequired()
+ .HasColumnType("varchar(200)");
+
+ b.HasKey("studentID");
+
+ b.HasIndex("classID");
+
+ b.HasIndex("studentID1");
+
+ b.ToTable("Student");
+ });
+
+ modelBuilder.Entity("CHW.Models.score", b =>
+ {
+ b.HasOne("CHW.Models.course", "score_course")
+ .WithMany("courseWithscore")
+ .HasForeignKey("courseID")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CHW.Models.student", "score_student")
+ .WithMany()
+ .HasForeignKey("studentID")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("score_course");
+
+ b.Navigation("score_student");
+ });
+
+ modelBuilder.Entity("CHW.Models.student", b =>
+ {
+ b.HasOne("CHW.Models.CLASS", "studentClass")
+ .WithMany("Classwithstudent")
+ .HasForeignKey("classID")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CHW.Models.student", null)
+ .WithMany("studentWithscore")
+ .HasForeignKey("studentID1");
+
+ b.Navigation("studentClass");
+ });
+
+ modelBuilder.Entity("CHW.Models.CLASS", b =>
+ {
+ b.Navigation("Classwithstudent");
+ });
+
+ modelBuilder.Entity("CHW.Models.course", b =>
+ {
+ b.Navigation("courseWithscore");
+ });
+
+ modelBuilder.Entity("CHW.Models.student", b =>
+ {
+ b.Navigation("studentWithscore");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092317_foveteen.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092317_foveteen.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..64f4cf8f1a8bb07c47481fa72ffe53d672156244
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092317_foveteen.cs"
@@ -0,0 +1,60 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ ///
+ public partial class foveteen : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "players");
+
+ migrationBuilder.DropPrimaryKey(
+ name: "PK_clud",
+ table: "clud");
+
+ migrationBuilder.RenameTable(
+ name: "clud",
+ newName: "Clud");
+
+ migrationBuilder.AddPrimaryKey(
+ name: "PK_Clud",
+ table: "Clud",
+ column: "CludId");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropPrimaryKey(
+ name: "PK_Clud",
+ table: "Clud");
+
+ migrationBuilder.RenameTable(
+ name: "Clud",
+ newName: "clud");
+
+ migrationBuilder.AddPrimaryKey(
+ name: "PK_clud",
+ table: "clud",
+ column: "CludId");
+
+ migrationBuilder.CreateTable(
+ name: "players",
+ columns: table => new
+ {
+ ID = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ Name = table.Column(type: "nvarchar(max)", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_players", x => x.ID);
+ });
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092946_fiveteen.Designer.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092946_fiveteen.Designer.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..2b642c9ae5d28280e0e213fec727ee02b8eb2b9a
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092946_fiveteen.Designer.cs"
@@ -0,0 +1,163 @@
+//
+using CHW.DATE;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ [DbContext(typeof(chwContext))]
+ [Migration("20221225092946_fiveteen")]
+ partial class fiveteen
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.1")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CHW.Models.CLASS", b =>
+ {
+ b.Property("classID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("classID"));
+
+ b.Property("class_title")
+ .IsRequired()
+ .HasColumnType("varchar(20)");
+
+ b.HasKey("classID");
+
+ b.ToTable("Class");
+ });
+
+ modelBuilder.Entity("CHW.Models.course", b =>
+ {
+ b.Property("courseID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("courseID"));
+
+ b.Property("course_title")
+ .IsRequired()
+ .HasColumnType("varchar(20)");
+
+ b.Property("credit")
+ .HasColumnType("int");
+
+ b.HasKey("courseID");
+
+ b.ToTable("Course");
+ });
+
+ modelBuilder.Entity("CHW.Models.score", b =>
+ {
+ b.Property("scoreID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("scoreID"));
+
+ b.Property("Score")
+ .HasColumnType("int");
+
+ b.Property("courseID")
+ .HasColumnType("int");
+
+ b.Property("studentID")
+ .HasColumnType("int");
+
+ b.HasKey("scoreID");
+
+ b.HasIndex("courseID");
+
+ b.HasIndex("studentID");
+
+ b.ToTable("Scores");
+ });
+
+ modelBuilder.Entity("CHW.Models.student", b =>
+ {
+ b.Property("studentID")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("studentID"));
+
+ b.Property("classID")
+ .HasColumnType("int");
+
+ b.Property("studentGender")
+ .IsRequired()
+ .HasColumnType("varchar(50)");
+
+ b.Property("studentName")
+ .IsRequired()
+ .HasColumnType("varchar(200)");
+
+ b.HasKey("studentID");
+
+ b.HasIndex("classID");
+
+ b.ToTable("Student");
+ });
+
+ modelBuilder.Entity("CHW.Models.score", b =>
+ {
+ b.HasOne("CHW.Models.course", "score_course")
+ .WithMany("courseWithscore")
+ .HasForeignKey("courseID")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CHW.Models.student", "score_student")
+ .WithMany("studentWithscore")
+ .HasForeignKey("studentID")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("score_course");
+
+ b.Navigation("score_student");
+ });
+
+ modelBuilder.Entity("CHW.Models.student", b =>
+ {
+ b.HasOne("CHW.Models.CLASS", "studentClass")
+ .WithMany("Classwithstudent")
+ .HasForeignKey("classID")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("studentClass");
+ });
+
+ modelBuilder.Entity("CHW.Models.CLASS", b =>
+ {
+ b.Navigation("Classwithstudent");
+ });
+
+ modelBuilder.Entity("CHW.Models.course", b =>
+ {
+ b.Navigation("courseWithscore");
+ });
+
+ modelBuilder.Entity("CHW.Models.student", b =>
+ {
+ b.Navigation("studentWithscore");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git "a/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092946_fiveteen.cs" "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092946_fiveteen.cs"
new file mode 100644
index 0000000000000000000000000000000000000000..50177adfcdcb15c6e87b6d69d74f507d641450cb
--- /dev/null
+++ "b/12 \351\231\210\345\215\216\344\274\237/\344\275\234\344\270\232/2022-12-28 \346\225\260\346\215\256\345\210\240\351\231\244\357\274\214\345\211\215\347\253\257\351\241\265\351\235\242/CHW/Migrations/20221225092946_fiveteen.cs"
@@ -0,0 +1,98 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CHW.Migrations
+{
+ ///
+ public partial class fiveteen : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_Student_Student_studentID1",
+ table: "Student");
+
+ migrationBuilder.DropTable(
+ name: "Clud");
+
+ migrationBuilder.DropTable(
+ name: "league");
+
+ migrationBuilder.DropTable(
+ name: "mods");
+
+ migrationBuilder.DropIndex(
+ name: "IX_Student_studentID1",
+ table: "Student");
+
+ migrationBuilder.DropColumn(
+ name: "studentID1",
+ table: "Student");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AddColumn(
+ name: "studentID1",
+ table: "Student",
+ type: "int",
+ nullable: true);
+
+ migrationBuilder.CreateTable(
+ name: "Clud",
+ columns: table => new
+ {
+ CludId = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ CludName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
+ Grade = table.Column(type: "nvarchar(max)", nullable: false, defaultValue: "C")
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Clud", x => x.CludId);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "league",
+ columns: table => new
+ {
+ 联赛ID = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ 简介 = table.Column