38. For lazy loading custom data class navigational properties must be defined as overrideable (virtual).
39. Classes must not have any mapping attributes and must not implement IEntityWithChangeTrackeror IEntityWithRelationships interfaces.
40. ProxyCreationEnabled in the ObjectContext’sContextOptions must be set to true (default is true) for ObjectContext tracking.Author: Marjan Nikolovski Date: 11.02.2010
41.
42. Mapping DB to ModelAuthor: Marjan Nikolovski Date: 11.02.2010
43. Date Page 16 Author Mapping requirementsDB mapping and POCO class generation Remove custom tool Author: Marjan Nikolovski Date: 11.02.2010
44. Date Page 17 Author Mapping requirementsDB mapping and POCO class generationClasses handcrafting Author: Marjan Nikolovski Date: 11.02.2010
45. Date Page 18 Author Mapping requirementsDB mapping and POCO class generationClasses handcrafting Create DB Context Author: Marjan Nikolovski Date: 11.02.2010
46. Date Page 19 Author Mapping requirementsDB mapping and POCO class generationClasses handcrafting In practice Author: Marjan Nikolovski Date: 11.02.2010
53. Loading entity navigational propertiesExplicit loading Date Page 22 Author Lazy loading property in Object Context class must be set to false Author: Marjan Nikolovski Date: 11.02.2010
54. Loading entity navigational propertiesLazy loading Date Page 23 Author Lazy loading property in Object Context class must be set to true in order set auto navigation data loading Author: Marjan Nikolovski Date: 11.02.2010
55. Loading entity navigational propertiesEager loading Date Page 24 Author Eager loading is done by calling include method in LINQ query Author: Marjan Nikolovski Date: 11.02.2010
66. Defining service behavior where DataContractSerializer must be set in order proxy data to be resolved to known typeAuthor: Marjan Nikolovski Date: 11.02.2010
67. Serialization of proxy objects for WCF usageOne side implementation Date Page 32 Author Author: Marjan Nikolovski Date: 11.02.2010
What does ORM mapping do ?Custom classes as entity representing proxy do DBPOCO acronym non persistent classes
Unreadable code, bad programming style,bugish code.
No notice on using stored proc, security holes opened in application.
Unclear DDL logic
Programming speed.
DB easy switching, less time spent with multiplatform issues, less code.http://blogs.msdn.com/adonet/archive/2007/12/17/the-ado-net-entity-framework-not-just-for-sql-server.aspx
Less time getting nervous with debugging app-to-rdbm queries.
What can go wrong? Problem:Schema specified is not valid. Errors: The relationship ’DB’. 'Entity' was not loaded because the type 'DB’.’SecondEntity' is not available. Solution:Naming mistakes, check if class properties are same as in the Entity Model
Usually used when using web services.Definition of a new behavior attribute that will implement data serialization from proxy to known typeDataContractSerializer and ProxyDataContractResolverDataContractSerializer is instructed how so resolve proxy types.
Usually used when using web services.Definition of a new behavior attribute that will implement data serialization from proxy to known typeDataContractSerializer and ProxyDataContractResolverDataContractSerializer is instructed how so resolve proxy types.
Usually used when using web services.Definition of a new behavior attribute that will implement data serialization from proxy to known typeDataContractSerializer and ProxyDataContractResolverDataContractSerializer is instructed how so resolve proxy types.