我正在接受培训并查看一些网络应用程序的代码。我们在我们的组织中使用 MVC,我不确定为什么我们需要 2 个这样的构造函数,请解释一下,以便我可以更好地了解它。谢谢。
namespace ddc.Core.Domain
{
public class Request : Entity
{
public Request()
{
}
public Request(int buildingId, int adId, DateTime eventDate, DateTime eventStart, DateTime eventEnd, DateTime? timeOfApproval)
{
this.BuildingId = buildingId;
this.AdId = adId;
this.EventDate = eventDate;
this.StartTime = eventStart;
this.PowerNeed = powerNeed;
this.EventDescription = eventDescription;
this.EnteredBy = enteredBy;
this.EnteredOn = enteredOn;
this.TimeOfApproval = timeOfApproval;
}
public virtual int BuildingId { get; set; }
public virtual int AdId { get; set; }
public virtual DateTime EventDate { get; set; }
public virtual DateTime StartTime { get; set; }
public virtual DateTime EndTime { get; set; }
public virtual DateTime? TimeOfApproval { get; set; }
}
}
肥皂起泡泡
守候你守候我
湖上湖
相关分类