排球计分程序(三)—— 模型类的设计与实现
通過EF框架設計模型生成數據圖和表:?
1)添加運動員模型類:
namespace 排球計分程序.Models
{
??? public class Ball
??? {
??????? public int ID { get; set; }
??????? public string XingMing { get; set; }
??????? public string Age { get; set; }
??????? public string WeiZhi { get; set; }
??????? public string Shenglv { get; set; }
??????? public string RongYu { get; set; }
??? }
??? public class BallDBContext : DbContext
??? {
??????? public DbSet<Ball> Movies { get; set; }
??? }
}
2)添加隊伍公告模型類:
namespace 排球隊伍公告信息.Models.Entities
{
??? public class AnnounceInfo
??? {
??????? public int ID { get; set; }
??????? public string Title { get; set; }
??????? public string Content { get; set; }
??????? public string DuiMing { get; set; }
??????? public string Jieshao { get; set; }
??????? public int Category { get; set; }
??? }
}
3)添加比賽計分類:
namespace 排球計分.Models
{
??? public class Team
??? {
??????????? public int ID { get; set; }//ID號
??????????? public string Name { get; set; }//隊名
??????????? public decimal Score { get; set; }//得分
???????????????????
??????????? public string?? Team { get; set; }
??????????? public string? Score { get; set; }
??????????? public string? Add { get; set; }
??????????? public string Delete { get; set; }
??????????? public string Faqiu { get; set; }
??????????? public string Lanwang? { get; set; }
??????????? public string Kouqiu { get; set; }
??????????? public string Zhugong { get; set; }
???????????
??? }
}
轉載于:https://www.cnblogs.com/sdl1305702018/p/7063605.html
總結
以上是生活随笔為你收集整理的排球计分程序(三)—— 模型类的设计与实现的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Qt之模式、非模式、半模式对话框
- 下一篇: LeetCode 75 颜色分类