이건 db입니다.

 

namespace DataServer_v3.Models
{
    public class WinningUserProfiles
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }
      
        // 필수 입력
        //[Required]
        [Display(Name = "당첨된 선물 ID")]
        public int PresentID { get; set; }
        [Display(Name = "유저 ID")]
        [StringLength(50)]
        public string UserID { get; set; }
        [Display(Name = "주소")]
        [StringLength(100)]
        public string Address { get; set; }
        [Display(Name = "핸드폰 번호")]
        [StringLength(50)]
        public string Phone { get; set; }
    }
}

 

이건 cshtml이고요

<div id="" /*style="display:none"*/>
  <ul style="margin:0 auto;">
   <li style="position:absolute; margin:-60px 0 0 5px;"><img src="@Url.Content("~/images/images/title_3.png")" alt="" style=""/></li>
   <li style="margin-top:80px;"><img src="@Url.Content("~/images/images/input_topbg.png")" alt="" style=""/></li>
   <li style="position:absolute; margin-left:130px; "><img src="@Url.Content("~/images/images/input_text.png")" alt="" style=""/></li>
   <li style="padding-top:50px; background-image: url('@Url.Content("~/images/images/input_middlebg.png")'); background-repeat: y; background-position: top center;  height:100%; margin:0 auto; ">
    <table width="546" height="100%" border="2" cellspacing="2" cellpadding="0" valign="top" bgcolor="#ffffff" style=" margin:0 auto;">
     <tr>
      <td valign="top" class="tdip">성 함</td>
      <td valign="top"><input type="text" name="Name" maxlength="20" class="inip" ></td>
     </tr>
     <tr>
      <td valign="top" class="tdip">연락처</td>
      <td valign="top"><input type="text" name="Phone" maxlength="20" class="inip" ></td>
     </tr>
     <tr>
      <td valign="top" class="tdip">주 소</td>
      <td valign="top"><input type="text" name="Address" maxlength="20" class="inip"></td>
     </tr>
     <tr>
      <td valign="top" align="left" colspan="2" height="10"></td>
     </tr>
     <tr>
      <td valign="top" align="left" colspan="2" class="agte">
      <input type="checkbox" name="agree" class="agck" align="absmiddle">개인정보 활용동의</td>
     </tr>
     <tr>
      <td valign="top" align="left" colspan="2" height="30"></td>
     </tr>

 

보통 cshtml에서 다 디비값을 읽거나 쓰거나하는데

cshtml에서 쓰면

cs파일에서 받아서 db에 저장시키고싶은 데 방법없나요?