This is a migrated thread and some comments may be shown as answers.

How to persist a complex type in forward mapping

1 Answer 42 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tim
Top achievements
Rank 1
Tim asked on 17 Aug 2011, 02:45 PM
Hi,

I have a set of classes already and I am trying to map them to database.
However, some of my properties are complex types such as custom class, structure.
How can I persist those properties using complex types?

Here are sample codes similar to my classes.
I need to persist Book class to database.
How do I configure the MainAuthor, CoAuthor and Index properties (in forward mapping wizard or other ways)?

Thanks.

 
Public Class Book
    Public Property Title As String
    Public Property PublishDate As Date
    Public Property Publisher As String
    Public Property ISBN As String
    Public Property MainAuthor As Author
    Public Property CoAuthor As Author
    Public Property Index As BookIndexCode
End Class
  
Public Class Author
    Public Property FirstName As String
    Public Property LastName As String
    Public Property Expertise As String
End Class
  
Public Structure BookIndexCode
    Dim Category As Integer
    Dim Subcategory As Integer
    Dim Segment As Integer
    Dim SerialNumber As Integer
End Structure

1 Answer, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 18 Aug 2011, 01:00 PM
Hi Tim,

I recommend you reading this help article which demonstrates how to achieve that goal.
Hope that helps. If any other questions arise, do not hesitate to contact us back.

Best wishes,
Damyan Bogoev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
Databases and Data Types
Asked by
Tim
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Share this question
or