Alternate Keys in Entity Framework 7

Sign in to queue

Description

In this short video Rowan takes us through the process of using alternate keys in Entity Framework 7. Here are some links for more information:

As an aside, I spent a couple of days with Rowan (and team) recording additional videos regarding Entity Framework 7 and some of the new features to look for in the coming release. Stay tuned!

Embed

Download

Download this episode

The Discussion

  • User profile image
    ojorma

    Thats one code too many for something rather simple. Good work but I think using attribute would have been great or at least a simpler syntax like something in django

  • User profile image
    br1

    I use the fluent api mostly to disable cascade deletes when there are two paths between two entities. Please make the sql team lift the restriction. It's always a hassle to do the ping pong between entities, t =>, p=> t => again, p =>, finally. I never remember if I have to start from the many or the 1 side of the relation.  I would much prefer to just call a method, if maybe less 'fluently'.

  • User profile image
    romiller

    @ojorma - At the moment we only have the [Key] annotation for defining primary keys... but that's a good suggestion, an [AlternateKey] annotation would be useful.

  • User profile image
    romiller

    @br1 - We'll be starting work on cascade delete support shortly, so I'll keep your feedback in mind when we design it.

Add Your 2 Cents