Support for EF6 (and some EF fixes in general)