locked
How to add unique non primary-key field to entity using Entity Framework 5 RRS feed

  • Question

  • User-1499457942 posted

    Hi

      How to add unique non primary-key to Entity using Entity Framework 5

    Thanks

    Wednesday, February 1, 2017 6:12 AM

Answers

  • User-821857111 posted

    That version of EF doesn't support unique constraints. It wasn't added until 6.1. You will have to add it to the database manually.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 1, 2017 8:08 AM

All replies

  • User-821857111 posted

    That version of EF doesn't support unique constraints. It wasn't added until 6.1. You will have to add it to the database manually.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 1, 2017 8:08 AM
  • User-851967432 posted

    ...or use a .Net GUID

    Thursday, February 2, 2017 8:07 PM