I wrote module for Orchard CMS, and I need to have many (about 120)
Projections, filtered by fields in my ContentType. From web interface, I can do it by: create Binding, create query based on Binding, create Projection based on Query. But I need do it programmatically.
I suppose, that it’s really to do it from database. Which tables I need add records to create projection? Or there is another way to solve this problem?
Thank you!
Don’t write to the tables directly, always go through the content manager to create contents. Otherwise, it’s very likely that you will corrupt your database.
Also, 120 projections sounds very suspicious. You can probably bring that number down to a few with custom filters, if even that.
From what you’ve written elsewhere on this (because this is unfortunately a cross-posted question, which only creates more work answering in both places), your problem could be much better solved with taxonomies, which have everything you want out of the box.