ASP Core 2中的自定义模型活页夹

时间:2018-08-02 17:09:47

标签: modelbinder

public class Period
{
public int PeriodId { get; set; }
public string Title { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public bool IsActive { get; set; }
}
public class EvaluationItemsPeriod
{
public int EvaluationItemsPeriodId { get; set; }
public int EvaluationItemId { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
}

public IActionResult CreatePeriod(Period period)
{
if (ModelState.IsValid)
{
}
return View(period);
}

如何在Property上创建Model活页夹是Datetime日期类型 如何使用动作 如何在服务中定义

0 个答案:

没有答案