Work with groups

Create groups

To create a group: 

  1. Get an instance of the Comment Service by using the GetCommentsService method part of the SystemManager.
  2. Create an AuthorProxy.
    When creating comments information is required about the author of the new comment, for example a name, an email, and so on. Therefore, there is an  AuthorProxy class that implements the IAuthor interface.
  3. To create a group, you need to create a GroupProxy. The constructor requires as parameters a title, description, and an author.
  4. Create the group using the CreateGroup method as part of the comment service by passing the groupProxy as a parameter.
The following code creates a group:

Query groups

Choose any of the following options to retrieve groups:

  • Get a thread by groupKey:
  • Get all groups by specific criteria.
    You must use the GetGroups method part of the comments service:

    or

Delete groups

You can delete group using the DeleteGroup.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?

Next article

Comments events