Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » FK Associations   (RSS)
Tip 39 – How to set overlapping Relationships – EF 4.0 only
Scenario: In EF 4 we have FK relationships , available for the first time in .NET 4.0 Beta 2, so it is now possible to have a model something like this: public class Division { public int DivisionID {get;set} // Primary Key public string Name {get;set;} Read More...
Tip 26 – How to avoid database queries using Stub Entities
What are Stub Entities? A stub entity is a partially populated entity that stands in for the real thing. For example this: Category c = new Category {ID = 5}; is a stub entity. It has only the ID populated, which indicates this is a stub for Category Read More...
Tip 17 – How to do one step updates with AttachAsModified(..)
Background: In Tip 13 - How to Attach the easy way I showed you how to ‘establish’ the EntitySet for a particular CLR Type so you could Attach it. But in all the tips so far the same basic pattern is used: Attach the original version of the Entity Modify Read More...
Tip 7 - How to fake Foreign Key Properties in .NET 3.5 SP1
Background If you've been reading the EF Design Blog you will have seen that we recently announced something called " FK Associations " for the EF in .NET 4.0. However in .NET 3.5 SP1, we only support Independent Associations. What that means is that Read More...
Page view tracker