@@ -60,6 +60,13 @@ namespace <#=entity.Namespace.GetNamespaceName()#>
6060
6161 var propertyName = property.Name.ToCheckedCase();
6262 var propertyCollectionPage = property.IsReference() ? string.Concat(entityName, propertyName, "CollectionWithReferencesPage") : string.Concat(entityName, propertyName, "CollectionPage");
63+
64+ var attributeDefinition = string.Format("[DataMember(Name = \"{0}\", EmitDefaultValue = false, IsRequired = false)]", property.Name);
65+
66+ if (string.Equals(property.Type.FullName, "Edm.Date", StringComparison.OrdinalIgnoreCase))
67+ {
68+ attributeDefinition = string.Concat("[EdmDateConverter]", Environment.NewLine, " ", attributeDefinition);
69+ }
6370
6471 if (property.IsCollection())
6572 {
@@ -70,7 +77,7 @@ namespace <#=entity.Namespace.GetNamespaceName()#>
7077 /// <summary>
7178 /// Gets or sets <#=property.Name.SplitCamelCase().ToLower()#>.
7279 /// </summary>
73- [DataMember(Name = " <#=property.Name#>", EmitDefaultValue = false, IsRequired = false)]
80+ <#=attributeDefinition#>
7481 public I<#=propertyCollectionPage#> <#=propertyName.GetSanitizedPropertyName()#> { get; set; }
7582 <#
7683 }
@@ -81,7 +88,7 @@ namespace <#=entity.Namespace.GetNamespaceName()#>
8188 /// <summary>
8289 /// Gets or sets <#=property.Name.SplitCamelCase().ToLower()#>.
8390 /// </summary>
84- [DataMember(Name = " <#=property.Name#>", EmitDefaultValue = false, IsRequired = false)]
91+ <#=attributeDefinition#>
8592 public IEnumerable<<#=propertyType#>> <#=propertyName.GetSanitizedPropertyName()#> { get; set; }
8693 <#
8794 }
@@ -93,7 +100,7 @@ namespace <#=entity.Namespace.GetNamespaceName()#>
93100 /// <summary>
94101 /// Gets or sets <#=property.Name.SplitCamelCase().ToLower()#>.
95102 /// </summary>
96- [DataMember(Name = " <#=property.Name#>", EmitDefaultValue = false, IsRequired = false)]
103+ <#=attributeDefinition#>
97104 public <#=propertyType#> <#=propertyName.GetSanitizedPropertyName()#> { get; set; }
98105 <#
99106 }
0 commit comments