Browse by Tags

Tagged Content List
  • Blog Post: 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;} public virtual List<Lawyer> Lawyers {get;set;...
  • Blog Post: 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 5. When are Stub Entities Useful...
  • Blog Post: 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 it SaveChanges I’ve given you tips to make it...
  • Blog Post: 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 the FK Columns aren't available as Properties in the...
Page 1 of 1 (4 items)