API support

CSOM SSOM

Can be deployed under

List

Notes

List item provision is enabled via ListItemDefinition object.

Examples

Add list item

var listDef = new ListDefinition
{
    Title = "Customers",
    TemplateType = BuiltInListTemplateTypeId.GenericList,
    CustomUrl = "lists/customers",
};

var model = SPMeta2Model.NewWebModel(web =>
{
    web.AddList(listDef, list =>
    {
        list
            .AddListItem(new ListItemDefinition { Title = "Microsoft" })
            .AddListItem(new ListItemDefinition { Title = "Apple" })
            .AddListItem(new ListItemDefinition { Title = "IBM" });
    });
});

DeployModel(model);