元组问题@model元组 >

问题描述 投票:0回答:1

我在项目上使用首先使用数据库]。我将保存到配置文件表,并在此页上的部门表中填充下拉列表。如何在profile.cs的视图中同时使用department.csProfile.cshtml?这是一个创建页面。

这是Profile.cs;

public partial class Profile
{
    public int ProfileID { get; set; }
    public string Firstname { get; set; }
    public string Surname { get; set; }
    public string Department { get; set; }
    public string Office { get; set; }
    public string Location { get; set; }
    public string Username { get; set; }
    public string Email { get; set; }
    public string MobileNumber { get; set; }
    public string Title { get; set; }
    public bool Status { get; set; }
    public string Note { get; set; }
    public byte[] Image { get; set; }
    public string Gender { get; set; }
    public Nullable<System.DateTime> RecordDate { get; set; }

}

这是Department.cs;

public partial class Department
{
    public int DepartmentID { get; set; }
    public string DepartmentName { get; set; }
    public string Location { get; set; }

}

我首先在项目上使用数据库。我将保存到配置文件表并在此页面上填写部门表的下拉列表。如何在Profile.cshtml的视图中同时使用profile.cs和department.cs?它...

asp.net-mvc model-view-controller view model database-first
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.