摘要:
code first :约定大于配置(通过配置实体重写约定) 通过两种方式配置实体:DataAnnotations Fluent Api System.ComponentModel.DataAnnotations命名空间中只定义了部分实体验证的特性,在EntityFramework程序集中定义了更多 阅读全文
摘要:
上下文Context类中的base构造器的几个方法重置(1、无参 2、database name 3 、 连接字符串) 无参:如果基类base方法中无参,code first将会以 :{Namespace}.{Context class name} 为名字创建一个服务 1 public class 阅读全文