我浏览了几个 asp.net 申请表 asp.net
我看到一些示例不使用像http://www.asp.net/downloads/starter-kits/job这样的OOP 聚合或包含 ,例如开发人员在我的职位发布类和公司类中使用 countryID 而不是国家对象。
我想知道是否推荐这种方式
public class JobPosting
{
#region Member Variables
private int intJobPostingID;
private int intCompanyID;
private string strContactPerson;
private string strTitle;
private string strDepartment;
private string strJobCode;
private string strCity;
private int intStateID;
private int intCountryID;
private int intEducationLevelID;
private int intJobTypeID;
private decimal dblMinSalary;
private decimal dblMaxSalary;
private string strDescription;
private DateTime dtPostingDate=DateTime.Now;
private string strPostedBy=HttpContext.Current.Profile.UserName;
}
public class Country
{
private string strCountryName;
private int intCountryID;
public Country()
{
}
}
public class Company
{
private int intCompanyID;
private string strUserName;
private string strCompanyName;
private string strBriefProfile;
private string strAddress1;
private string strAddress2;
private string strCity;
private int intStateID;
private int intCountryID;
private string strZIP;
private string strPhone;
private string strFax;
private string strEmail;
private string strWebSiteUrl;
}