Entity framework自定义字段实现思路
2024-09-03 02:58:18
ublic class MyModel
{
public int MyModelID { get; set; } public string FixedProperty1 { get; set; }
public string FixedProperty2 { get; set; } // This is a navigation property for all your custom properties
public virtual ICollection<CustomProperty> CustomProperties { get; set; }
} public class CustomProperty
{
public int CustomPropertyID { get; set; } // This is the name of custom field
public string PropertyName { get; set; }
// And this is its value
public string PropertyValue { get; set; } // FK reference and navigation property to your main table
public int MyModelID { get; set; }
public virtual MyModel MyModel { get; set; }
}
最新文章
- 正则表达式测试器 beta_
- 基本hibernate DEMO
- Javascript 去掉字符串前后空格的五种方法
- Linux 设备模型浅析之 uevent 篇(2)
- 安装PHP出现make: *** [sapi/cli/php] Error 1 解决办法
- wpf 窗体中显示当前系统时间
- fedorea19安装redis
- PRINCE2考试一共多少道题
- Jimmychoo商城系统总结
- three.js初探,立体几何入手(一)
- windows系统下将nginx作为系统服务启动
- CC2530学习路线-基础实验-GPIO 控制LED灯亮灭(1)
- spring cloud 报错Error creating bean with name &#39;hystrixCommandAspect&#39; ,解决方案
- Spring MVC 拦截器配置 -- 利用session
- Python 转义符
- mysql刷新mysql-bin
- php的正则表达式完全手册
- 屏蔽信号的多路选择I/O
- 开发微信小程序入门教程,含破解工具
- ruby 批量下载王者荣耀皮肤