类拟Hibernate注解,使用hibernate注解@Transien放在实体类的属性上可以解决上面的问题,但是在C#中有没有实现此功能,如何解决
code-first开发的话用NotMapped属性
[NotMapped] public string test{get;set;}