Created
September 18, 2014 08:34
-
-
Save ianfnelson/3de705bc2eed6a0a8cd5 to your computer and use it in GitHub Desktop.
Snippets for 2011 blog post "Entity Framework Week Part 3: Runtime Issues Encountered"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Order | |
{ | |
public Order() | |
{ | |
this.Address = new Address(); | |
} | |
public virtual Address Address { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Order | |
{ | |
public Order() | |
{ | |
this._address = new Address(); | |
} | |
private Address _address; | |
public virtual Address Address | |
{ | |
get { return _address; } | |
set { _address = value; } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Order | |
{ | |
public Order() | |
{ | |
this._address = new Address(); | |
} | |
private Address _address; | |
public virtual Address Address | |
{ | |
get { return _address ?? (_address = new Address()); } | |
set { _address = value; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment