I have a model such as this (simplified)
public class Post
{
public string ID { get; set; }
public string Title { get; set; }
public string Body { get; set; }
public string AuthorName { get; set; }
public List<string> Attachments { get; set; }
}
In my database, I have a Post table, and a PostAttachment table
Post Attachment table has 2 columns:
PostID AttachmentKey
(The basics of this are that the attachment is uploaded to amazon s3, so the AttachmentKey is the s3 key)
What I want to do is map the AttachmentKey to the List of a returned / inserted Post object...
How would I go about doing this?