I'm not done writing about this yet, but I'll try to just give you a quick summary:
- 2sxc usually takes care of getting Content or Data for your Template or View. So in general, you do not have to write any code to get content/data, it's just there. So there are at least x ways to get Content/Data
- In the basic data-objects like @Content or @ListContent - you'll see many code-samples using this
- From the @Data object which contains lists of content-items which were delivered to this template (MVC-Style). So Data["Default"] contains the main Stream of data, but together with the Visual-Query-Designer you can have many more streams. This is the preferred method for most data-lists and also works for SQL, CSV, FnL data etc.
- The @App.Data object is the global data-object for this App, giving you code-access to all Content-Items in this App
- Using custom C# code to get data in the Intialize-section of your template - like for SQL or other data.
- 2sxc gives you access to DNN material using the @Dnn Variable. It's identical to the standard Dnn Variable
- 2sxc also provides additional helpers like AsDynamic, AsEntity and more. You'll see many such examples in the demo-apps and code samples.
I'll try to write more about all this later on, but I think you'll find most of it intuitive if you check out some example Apps.