我如何在C#ASP.NET MVC一个视图创建多个条目? [英] How do I create multiple entries in one view in C# ASP.NET MVC?
本文介绍了我如何在C#ASP.NET MVC一个视图创建多个条目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个公司模型和员工的模型,我想创建一个公司,然后在一个视图中为公司创造多个员工。
I have a Company model and an Employee model and I want to create a Company and then create multiple employees for the company in one view.
我应该如何做到这一点的看法呢?
How should I do this in the view?
和我应该在创建POST方法做,以支持这一多次往返的看法?
And what should I do in the Create POST method to support this multi-entry view?
推荐答案
我真的不知道你在说什么,但这里有一个野生猜测:一个条目富
,多enries,的IEnumerable<富>
。听起来很熟悉?
I really have no idea what you are talking about but here's a wild guess: One entry Foo
, multiple enries, IEnumerable<Foo>
. Sounds familiar?
这篇关于我如何在C#ASP.NET MVC一个视图创建多个条目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文