实体类的创建

文章目录

    • 1 实体类的创建
      • 1.1 Student实体类
      • 1.2 StudentClass实体类
      • 1.3 ScoreList实体类
      • 1.4 SysAdmin实体类

1 实体类的创建

1.1 Student实体类

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Models
{
   /// 
   /// 学员实体类
   /// 
  public   class Student
    {
        public int StudentId { get; set; }
        public string StudentName { get; set; }
        public string Gender { get; set; }
        public DateTime Birthday{ get; set; }      
        //将数据库中的18位整数转换成字符串
        public string StudentIdNo { get; set; }
        public int Age { get; set; }
        public string PhoneNumber { get; set; }
        public string StudentAddress { get; set; }
        public string CardNo { get; set; }
        public int ClassId { get; set; }
    }
}

1.2 StudentClass实体类


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Models
{
    /// 
    /// 班级实体类
    /// 
    public class StudentClass
    {
        public int ClassId { get; set; }
        public string ClassName { get; set; }
    }
}

1.3 ScoreList实体类

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Models
{
    public class ScoreList
    {
        public int Id { get; set; }
        public int StudentId { get; set; }
        public int CSharp { get; set; }
        public int SQLServerDB { get; set; }
        public DateTime UpdateTime { get; set; }
    }
}

1.4 SysAdmin实体类

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Models
{
    /// 
    /// 管理员实体类
    /// 
    public class SysAdmin
    {
        public int LoginId { get; set; }
        public string AdminName { get; set; }
        public string LoginPwd { get; set; }

    }
}

你可能感兴趣的:(C#)