1

Closed

TrackableEntities.tt From EDMX and Complex Type

description

Hi Tony,

I've a problem with my model that contains complex types.
The generated code doesn't compile.
I noticed that NotifyPropertyChange() calls are generated but the class does not derive from ModelBase<T>.
What is the fix for that ?
Closed May 19, 2015 at 2:04 PM by tonysneed
Issues page as moved to GitHub.

comments

tonysneed wrote Aug 8, 2014 at 3:56 AM

Good catch. I think that may be missing from the model-first T4 template. I'll have a look ...

rpinchbeck wrote Sep 17, 2014 at 1:48 AM

I fixed it by changing line 202 of the ClientTrackableEntitiesGeneratorForEF6.tt from ...

<#=Accessibility.ForType(complex)#> partial class <#=code.Escape(complex)#>>

... to ...

<#=Accessibility.ForType(complex)#> partial class <#=code.Escape(complex)#> : ModelBase<<#=code.Escape(complex)#>>

-=Bob

tonysneed wrote Sep 17, 2014 at 7:44 AM

Perfect! Would you like to clone the repo and create a pull request?

Cheers,
Tony