T
T
Timur Tuz2015-05-22 10:05:05
.NET
Timur Tuz, 2015-05-22 10:05:05

Partial classes, how to add DataAnnotations to Property?

There is an automatically generated partial class. I want to augment its Property with metadata in a second partial class without overloading the logic of the Property itself. How can I do that? Judging by the docks in the forehead, this can only be done with functions by adding partial to them, but with properties it is not clear.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Tuz, 2015-05-22
@TTA

Understood.

<MetadataType(GetType(Metatezt))> _
Class tezt
    Property qq As String
End Class

Class Metatezt
    <DisplayName("Детали заказа")> _
    Property qq As String
End Class

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question