This question is locked. New answers and comments are not allowed.
Hello,
I'm getting a designer time error when i make a property enumerable:
The VS editor gives the following error:
Overload resolution failed because no accessible 'HasProperty' is most specific for these arguments:
'Public Function HasProperty(Of TKey, TValue)(expression As System.Linq.Expressions.Expression(Of System.Func(Of Table, System.Collections.Generic.IDictionary(Of TKey, TValue)))) As Telerik.OpenAccess.Metadata.Fluent.PrimitiveDictionaryPropertyConfiguration(Of Table, TKey, TValue)': Not most specific.
'Public Function HasProperty(expression As System.Linq.Expressions.Expression(Of System.Func(Of Table, System.Enum))) As Telerik.OpenAccess.Metadata.Fluent.PrimitivePropertyConfiguration': Not most specific.
'Public Function HasProperty(expression As System.Linq.Expressions.Expression(Of System.Func(Of Table, Integer))) As Telerik.OpenAccess.Metadata.Fluent.PrimitivePropertyConfiguration': Not most specific.
While it states here that it should be possible:
http://www.telerik.com/help/openaccess-orm/fluent-mapping-mapping-clr-enum-support.html
Must I do more? I do want to use explicit mapping.
Thanks,
Erik
I'm getting a designer time error when i make a property enumerable:
Public
Enum
OrderStatus
Unknown = 0
Processing
Shipped
Delivering
Canceled
End
Enum
Public
Class
Order
Private
mloc_OrderId
As
Long
Public
Property
OrderId
As
Long
Get
Return
mloc_OrderId
End
Get
Set
(
ByVal
value
As
Long
)
mloc_OrderId = value
End
Set
End
Property
Private
mloc_OrderStatus
As
OrderStatus
Public
Property
OrderStatus
As
OrderStatus
Get
Return
mloc_OrderStatus
End
Get
Set
(
ByVal
value
As
OrderStatus)
mloc_OrderStatus = value
End
Set
End
Property
.....
End
Class
Public
Function
GetConfiguration()
As
MappingConfiguration
Dim
Configuration
As
New
MappingConfiguration(Of Order)()
With
Configuration
.MapType(
Function
(p)
New
With
{p}).WithConcurencyControl(OptimisticConcurrencyControlStrategy.Changed).ToTable(
"Orders"
)
.FieldNamingRules.AddPrefix =
"mloc_"
.HasProperty(
Function
(f) f.OrderId).IsIdentity(KeyGenerator.Autoinc).HasFieldName(
"mloc_OrderId"
).WithDataAccessKind(DataAccessKind.ReadWrite).ToColumn(
"OrderId"
).IsNotNullable().HasColumnType(
"bigint"
).HasPrecision(0).HasScale(0)
.HasProperty(
Function
(f) f.OrderStatus).HasFieldName(
"mloc_OrderStatus"
).WithDataAccessKind(DataAccessKind.ReadWrite).ToColumn(
"OrderStatus"
).IsNotNullable().HasColumnType(
"int"
).HasPrecision(0).HasScale(0)
.....
The VS editor gives the following error:
Overload resolution failed because no accessible 'HasProperty' is most specific for these arguments:
'Public Function HasProperty(Of TKey, TValue)(expression As System.Linq.Expressions.Expression(Of System.Func(Of Table, System.Collections.Generic.IDictionary(Of TKey, TValue)))) As Telerik.OpenAccess.Metadata.Fluent.PrimitiveDictionaryPropertyConfiguration(Of Table, TKey, TValue)': Not most specific.
'Public Function HasProperty(expression As System.Linq.Expressions.Expression(Of System.Func(Of Table, System.Enum))) As Telerik.OpenAccess.Metadata.Fluent.PrimitivePropertyConfiguration': Not most specific.
'Public Function HasProperty(expression As System.Linq.Expressions.Expression(Of System.Func(Of Table, Integer))) As Telerik.OpenAccess.Metadata.Fluent.PrimitivePropertyConfiguration': Not most specific.
While it states here that it should be possible:
http://www.telerik.com/help/openaccess-orm/fluent-mapping-mapping-clr-enum-support.html
Must I do more? I do want to use explicit mapping.
Thanks,
Erik