如何在MVC 5中获取其他主要实体的团队实体细节? [英] How to get team entities details in other main entities in MVC 5?
问题描述
我有两个实体[Team],[MainEntry]。现在我想在下载MVC中的MainEntry视图
时获取所有团队详细信息。
换句话说,在MainEntry视图中,我希望在下拉列表中获取所有团队详细信息。 / p>
我使用VS-2015,MVC5,EF6和Code首次迁移。
公共类团队
{
public int TeamId {get;组; }
公共字符串TeamName {get;组; }
public string TeamAge {get;组; }
公共字符串TeamLocation {get;组; }
}
公共类MainEntry
{
public int MainEntryId {get;组; }
public string TeamAssignment {get;组; }
public string Role {get;组; }
public string Series {get;组; }
public string Stock {get;组; }
public string Points {get;组; }
public sting Teamname {get; set;} //(下拉填充)
public string Teamage {get; set;} // ( dropwon fill)
public string TeamLocation {get; set;} // (dropwon fill )
}
先谢谢..
我有2个实体和< g class =" gr_ gr_12 gr-alert gr_tiny gr_spell gr_disable_anim_appear ContextualSpelling multiReplace"数据-GR-ID =" 12英寸ID = QUOT; 12英寸I标记< / g取代; 想要在使用EF6代码首次迁移的mvc5中获取 MainEntry
时的详细信息。如何映射它们之间的关系?
注意:团队详细信息< g class =" gr_ gr_9 gr-alert gr_tiny gr_spell gr_disable_anim_appear ContextualSpelling multiReplace"数据-GR-ID =" 9" ID = QUOT; 9" I标记< / g取代;想要在
MainEntry视图中进行下拉控制。
public class Team
{
public int TeamId {get;组; }
公共字符串TeamName {get;组; }
public string TeamAge {get;组; }
公共字符串TeamLocation {get;组; }
}
公共类MainEntry
{
public int MainEntryId {get;组; }
public string TeamAssignment {get;组; }
public string Role {get;组; }
public string Series {get;组; }
public string Stock {get;组; }
public string Points {get;组; }public sting Teamname {get; set;}
public string Teamage {get; set;}
public string TeamLocation {get; set;}
}
提前致谢,
Hi,
I have two entities[Team],[MainEntry]. Now i want to get all team details in dropdown while entring in MainEntry view
in MVC.
In other word in the MainEntry views i want get all team details in the dropdown.
Im using VS-2015, MVC5, EF6 with Code first migration.
public class Team { public int TeamId { get; set; } public string TeamName { get; set; } public string TeamAge { get; set; } public string TeamLocation { get; set; } } public class MainEntry { public int MainEntryId { get; set; } public string TeamAssignment { get; set; } public string Role { get; set; } public string Series { get; set; } public string Stock { get; set; } public string Points { get; set; } public sting Teamname {get; set;} //(dropdown fill) public string Teamage {get;set;} //(dropwon fill) public string TeamLocation {get;set;} //(dropwon fill) }
Thanks in advance..
Hi,
I have 2 entities and <g class="gr_ gr_12 gr-alert gr_tiny gr_spell gr_disable_anim_appear ContextualSpelling multiReplace" data-gr-id="12" id="12">i</g> want to fetch details at the time of MainEntry in mvc5 using EF6 code first migration. How to map the relation between them?
Note: The team details <g class="gr_ gr_9 gr-alert gr_tiny gr_spell gr_disable_anim_appear ContextualSpelling multiReplace" data-gr-id="9" id="9">i</g> want in dropdown control in the MainEntry view.
public class Team { public int TeamId { get; set; } public string TeamName { get; set; } public string TeamAge { get; set; } public string TeamLocation { get; set; } } public class MainEntry { public int MainEntryId { get; set; } public string TeamAssignment { get; set; } public string Role { get; set; } public string Series { get; set; } public string Stock { get; set; } public string Points { get; set; }
public sting Teamname {get; set;}
public string Teamage {get;set;}
public string TeamLocation {get;set;}
}
Thanks in advance,
这篇关于如何在MVC 5中获取其他主要实体的团队实体细节?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!