Question

I'm trying learn more about RavenDB and at the moment to focus on how to write good Indexes for RavenDB.

Let's say I have a object, Session, with an organization as a property and I want to group all sessions by the organization. And also I wan't the result to contain a list with all Sessions. How can I accomplish this?

public class Session {
    public string Organization { get; set; }
    ...
}

public class OrganizationSessions {
    public string OrganizationName { get; set; }
    public List<Session> Sessions { get; set; }
}

Any help is appreciated!

Was it helpful?

Solution

Not the right question to ask.

Ask yourself what are you trying to do, and what model entities make the most sense to have. Then move from there.

Don't assume a class structure like you would have for a relational model.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top