C#MVC视图获取modle实体类中的参数

前端之家收集整理的这篇文章主要介绍了C#MVC视图获取modle实体类中的参数前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<p style="line-height:21px;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:14px;">
在Modle 创建专辑类 Album,它有两个属性:Title 和 Genre .


<div class="cnblogs_code" style="border:1px solid rgb(204,204,204);overflow:auto;font-family:'Courier New' !important;background-color:rgb(245,245,245);">
<pre style="font-family:'Courier New' !important;"><span style="color:rgb(0,255);line-height:1.5 !important;">public <span style="color:rgb(0,255);line-height:1.5 !important;">class Album
{
<span style="color:rgb(0,255);line-height:1.5 !important;">string Title { <span style="color:rgb(0,255);line-height:1.5 !important;">get; <span style="color:rgb(0,255);line-height:1.5 !important;">set; }
<span style="color:rgb(0,255);line-height:1.5 !important;">public Genre Genre { <span style="color:rgb(0,255);line-height:1.5 !important;">set; }
}

猜你在找的C#相关文章