In this video, the biggest expert on EF informs you about the most important new stuff in Entity Framework 4 (in NetFx 4) Great high-level demo’s of cool new features: Designer improvements Foreign Keys New code generation Support for simpler classes Change tracking for WCF Better n-tier support Lazy loading Code only development Must see!
Archive for the ‘Entity Framework’ Category
EF: use GetObjectByKey() for better performance
When I want to fetch an entity, I normally have a method that uses a query. This method will always query the database and you will have an up-to-date entity. But if you need better performance perhaps GetObjectByKey() is a better option. This method will check the cache first and returns the entity when [...]
Entity Framework Tips
Here's another useful link with tips about EF, written by on of the program managers. Most of the tips revolve about EF today, some of them are related to the upcoming release. Just to give you an idea, here are the latest tips: Tip 26 – How to avoid database queries using Stub Entities [...]
(JSON) Serialization with EF
I have two cascading dropdownlists in my application. The first one is to select the TagGroups (parent), and the second one shows the matching Tags (child)… this is a common scenario where it's useful to apply Ajax to improve the user experience. Stephen Walther has a good blog post about this. [ be careful when [...]
MetadataType attribute
I like the usage of attributes, mostly because it keeps my code clean. At the moment, I'm working with the Entity Framework, so my entities are generated. I want to use attributes for validation, and configure scaffolding (for DynamicData). But how can you place an attribute on a property of a generated class?? If you [...]
Enums in EF v1
De eerste versie van het entity framework ondersteunt nog geen gebruik van enums. het is dus (nog) niet mogelijk om de int die je opslaat in je database, automatisch te converteren naar een System.Enum. Dit is echter bijzonder eenvoudig op te lossen: maak de interne enum (dus de int die je opslaat in je store) [...]
De namespace wijzigen in EF
Standaard wordt de naam van de edmx file gebruikt als namespace voor de gegenereerde classes. Dit kun je natuurlijk aanpassen, maar je moet wel weten waar. Als je de .edmx file opent, krijg je een mooie designer waar je allerlei dingen kan aanpassen. Zo is er een mooie "namespace" property die je kan instellen als [...]
EF Faq
veel handige info over Entity Framework
Identity columns in EF
Ik ben bezig met een kleinschalig project, en heb in de db gekozen voor integers als primary keys. De db zorgt zelf voor unieke id’s en hoogt de integer elke keer één op. Ik probeerde een nieuw record te inserten met behulp van het EF, en omdat de db de id’s regelde deed ik hier [...]
EF: update model from database
Het is heel mooi dat je mbv het Entity Framework (EF) een conceptueel datamodel kan genereren. Maar een belangrijk issue wat speelt bij code generatie is hoe er wordt omgegaan met het updaten van wijzigingen. Nu had ik reeds een datamodel genereerd, toen ik erachter kwam dat het type van een bepaalde kolom niet correct [...]