排球计分程序(三)—— 模型类的设计与实现
2017-06-22 10:31
423 查看
通过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; }
}
}
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; }
}
}
相关文章推荐
- 排球计分程序(六)——接口的设计与实现
- 排球计分程序(四)—— View设计与实现
- MVC实战之排球计分(三)—— 模型类的设计与实现
- 排球计分程序(五)—— Controller的设计与实现
- MVC之排球比赛计分程序 ——(五)控制器的设计与实现
- MVC开发之排球计分(三)模型类与设计的实现
- MVC之排球比赛计分程序 ——(四)视图的设计与实现
- MVC之排球比赛计分程序 ——(三)model类的设计与实现
- 排球记分员计分程序(三)————设计文档的编写及构架概要设计
- MVC之排球比赛计分程序 ——(七)具体实现
- MVC开发之排球计分(五)Contoller的设计与实现
- ASP.NET MVC 排球计分程序 (四)实体类和SqlHelper类的设计
- 排球计分程序(一)—— 需求分析与数据模型设计
- 排球记分员计分程序(六)————Views视图的编码与设计
- ASP.NET MVC 排球计分程序 (三)需求分析与数据库设计
- ASP.NET MVC 排球计分程序 (四)实体类和SqlHelper类的设计
- MVC实战之排球计分(五)—— Controller的设计与实现
- MVC实战之排球计分(四)—— View设计与实现
- 排球计分程序(二)—— 构架概要设计
- MVC开发之排球计分(四)View的设计与实现