通过实体框架在HTML用户界面中的枚举示例 [英] Enum example in HTML User Interface via Entity Framework

查看:98
本文介绍了通过实体框架在HTML用户界面中的枚举示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您是否有一个示例来说明在HTML用户界面中使用Enum(例如,ShippingMethod = Fedex / UPS / DHL)并通过实体框架进行配置?

Do you have an example to show the use of Enum (say, ShippingMethod = Fedex/UPS/DHL) in the HTML user interface and which is configured via the Entity Framework?

以上内容适用于静态枚举。 此外,你将如何处理动态枚举 - 枚举值不是静态的。

The above is OK for static Enums.  Also, how will you handle dynamic Enums - where the Enum values are not static.

推荐答案

让我看看我是否理解你的问题: 您是否尝试完成模态选择器之类的操作,但是对于静态值(在您的情况下,是枚举)?

Let me see if I understood your question:  Are you trying to accomplish something like a Modal picker, but for static values (in your case, Enums)?

就动态值而言,这实际上更容易。 例如,请参阅ContosoMoving"编辑详细信息"中处理State的方式。对话框。

As far as dynamic values, that's actually easier.  For example, see the way State is handled in the ContosoMoving "Edit Details" dialog.


这篇关于通过实体框架在HTML用户界面中的枚举示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆