如何在asp.net中创建示例实体类

时间:2011-05-24 06:14:09

标签: asp.net asp.net-mvc asp.net-mvc-3

如何使用以下字段为Employee创建示例实体类 姓名,地址,EMAILID,******中国

2 个答案:

答案 0 :(得分:1)

在MSDN http://msdn.microsoft.com/en-us/library/bb399182.aspx

上查看这些快速入门者

手动创建自己的实体类不是必须的,MS提供了一个从现有数据库生成模型的向导。所以只需在项目中添加一个模型,它就会为您生成实体!

答案 1 :(得分:0)

  public class ClsCollegeData
{
    public string CollegeName;
    public string CollegePapularName;
    public string CollegeShortName;
    public string StreetAddrs;
    public string CollegeMobileNo;
    public string CollegePhone1;
    public string CollegePhone2;
    public string CollegeFaxNo;
    public string CollegeEmailId;
    public string YOS;
    public string CollegeCityName;
    public int CollegeCityId;
    public int CollegeStateId;
    public string CollegeImage;
    public string CollegeManagement;
    public string CollegeDescription;
    public string CollegeNRISeats;
    public string CollegeMQS;
    public string CollegeTrust;
    public int CourseId;
    public string CollegeConatctPersonName;
    public string CollegeConatctPersonMobile;
    public string CollegeContactPersonEmail;
    public string CollegeConatctPersonDesg;
    public string CollegeHostalInfo;
    public int StateId;
    public string CollegeWebSite;
    public int CollegeUniversity;
    public string CollegeEligibilty;
}