One-Many Relationship in ContentRecord

Topics: Writing modules
Dec 14, 2011 at 10:15 AM

I am trying to create Custom Orchard Map Module.Here is my model sample

public class Map

{

public List<MapUrl> Urls {get;set;}

}

 

public class MapUrl

{

public string Url {get;set;}

public string Name {get;set;}

public string Title {get;set;}

}

User can able to add one or more url (It is List type) while creating new Map ContentType in MapModule.

Example: Providing a textbox and add button in Editor template,that url should added to the list of Map class and stored in database after saving the new Map ContentType.

I want to know how the ContentRecord, Content Part,driver and migration class should be.

I can able to create module,part,driver,migration  with non collection type in model class.I tried the official sample of Map that has Lat & Long.But i need to get multiple Lat & long fields.

Please provide me a solution.

Coordinator
Jan 6, 2012 at 1:15 AM

Please read this: http://docs.orchardproject.net/Documentation/Creating-1-n-and-n-n-relations