Code First has the attribute [NotMapped] for properties which are not to be mapped: how would one achieve the same thing in model-first mode?
相关问题
- PagedList package installed, “missing assembly ref
- How does Entity Framework decide whether to refere
- Whats the difference between IQueryable and DbQuer
- Entity Framework Connection String Definition
- Data binding directly to a store query (DbSet, DbQ
相关文章
- Ignore Properties in OnModelCreating
- Two One-to-Many relationships in the same table
- Should we use Data Repository pattern in MVC appli
- Mocking DBSet, EF Model First
- When to call SaveChanges
- Why does EF 5.0 not support this EF 4.x LINQ synta
- Keep list of foreign keys in many-to-many Entity F
- Is it possible to create a generic method for addi
NotMapped
properties are not part of your mapping. When the model first approach is used EDMX represents the mapping so every property defined in the diagram is mapped. If you want to have non-mapped property it must not be defined in the diagram. All classes generated by EF's code generation are partial so you only need to create your own partial part of the class (it must be in the same namespace and assembly as generated part) and define your non-mapped property in code.