Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Edited Issue: Migrations: does not detect changes to DatabaseGeneratedOption [509]

$
0
0
VS12Pro, EF 5, steps to recreate:

- create class with custom primary [Key]
- create database
- enable migration
- result: table with correct primary key NOT NULL, but identity = false
- add [DatabaseGenerated(DatabaseGeneratedOption.Identity)] to primary key property
- run add-migration
- result: still identity = false, migration class: Up() and Down() are empty

The same is true for switching identity off on an existing column too.

Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>