Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6765071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:40:09+00:00 2026-05-26T14:40:09+00:00

I have been reading the various blog posts on how to deal with a

  • 0

I have been reading the various blog posts on how to deal with a Complex Type in EF including the brad wilson post which most everyone seems to link. owever i dont really get it. I am using EF code first development, MVC and VB. From what i have read so far to render a editor field for a complex types requires a custom object, right? However i dont really understand what code i need to put into the custom template. Can someone break it down for me as to what code needs to go into custom templete so i can render a textbox for the PostTags icollection?

My classes:

 Public Class Post
    Inherits EntityBase

    <Key()> Property PostId As Integer
    <DisplayName("Title")> <Required()> Property PostTitle As String
    <UIHint("MultilineText")> <DisplayName("Text")> Property PostText As String

    ReadOnly Property PostExcerpt As String
        Get
            If PostText.Length > 100 Then
                Return Helpers.TruncateHelper.TruncateAtWord(PostText, 250)
            Else : Return PostText
            End If
        End Get
    End Property

    <ScaffoldColumn(False)> Property PostDateCreated As DateTime
    <ScaffoldColumn(False)> Property PostDateModified As DateTime?
    <ScaffoldColumn(False)> Property PostDatePublished As DateTime?

    <DisplayName("Publish?")> Property PostIsPublished As Boolean
    <DisplayName("Allow Comments?")> Property CommentsAllowed As Boolean
    <ScaffoldColumn(False)> Property CategoryId As Integer?
    <UIHint("Text")> <DisplayName("Category")> <Required()> Property PostCategory As String
    Property Comments As IList(Of Comment)

    'Post has collection of Tags
    <DisplayName("Tags (comma separated)")> Overridable Property PostTags As ICollection(Of Tag)
End Class


    Public Class Tag
    Dim _rdsqlconn As RDSQLConn

    <Key()> Property TagId As Int32
    Property PostId As Int32
    Property TagWord As String

    'Overridable property to access Post
    Overridable Property Post As Post

End Class    
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:40:10+00:00Added an answer on May 26, 2026 at 2:40 pm

    Solved.

    Created the template Tags.vbhtml in the EditorTemplates folder and applied to PostTags. the template has the textbox which is shown in the view.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been googling and reading various posts around the net and I've tried:
I have been reading up on the technical basics of how SSL works (which
I have been reading all the Apple documentation on how to handle various events
I have been watching various videos and reading various blogs where they go about
I have been reading books trying to understand the various aspects of aggregation and
I have been reading through various questions on here, as I am learning VHDL
Various places I've been reading have pointed out that on deserialization, the .NET Framework
I have been reading documentation and the SMJobBless example and various discussions on the
I have been looking at MapReduce and reading through various papers about it and
I've been reading various posts on Stack Overflow to try and find an ideal

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.