---
title: "Class FluentMemberGroup"
slug: "fluent-sdk--stylelabs.m.sdk.fluent.models.fluentmembergroup"
abstract: ""
---
# Class FluentMemberGroup

Defines the fluent member group type.

## Inheritance

object

FluentMemberGroup

## Namespace: StylelabsStylelabs.MSdkFluentModels

## Assembly: Stylelabs.M.Sdk.Fluent.dll

## Syntax

```csharp
public class FluentMemberGroup
```

## Constructors

### FluentMemberGroup(IMemberGroup)

Initializes a new instance of the [FluentMemberGroup](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluentmembergroup.html) class.

#### Declaration

```csharp
public FluentMemberGroup(IMemberGroup memberGroup)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [IMemberGroup](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.imembergroup.html) | memberGroup | The member group. |

## Properties

### ContentGroup

#### Declaration

```csharp
public string ContentGroup { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string |  |

### IsConditional

#### Declaration

```csharp
public bool IsConditional { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### IsSecured

#### Declaration

```csharp
public bool IsSecured { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### IsSystemOwned

#### Declaration

```csharp
public bool IsSystemOwned { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

### Labels

#### Declaration

```csharp
public IDictionary<CultureInfo, string> Labels { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| IDictionary<, >CultureInfostring |  |

### Name

#### Declaration

```csharp
public string Name { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string |  |

### Object

Gets the [IMemberGroup](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.imembergroup.html).

#### Declaration

```csharp
public IMemberGroup Object { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| [IMemberGroup](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.imembergroup.html) |  |

## Methods

### AddPropertyDefinition<TDefinition>(string, Action<TDefinition>)

Adds a property definition.

#### Declaration

```csharp
public FluentMemberGroup AddPropertyDefinition<TDefinition>(string name, Action<TDefinition> initializer = null) where TDefinition : IPropertyDefinition, new()
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | The name of the property definition. |
| Action<> | initializer | The property definition initializer. |

#### Returns

| Type | Description |
| --- | --- |
| [FluentMemberGroup](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluentmembergroup.html) | The [FluentMemberGroup](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluentmembergroup.html). |

#### Type Parameters

| Name | Description |
| --- | --- |
| TDefinition | The definition type. |

### AddRelationDefinition(string, RelationRole, FluentEntityDefinition, Action<IRelationDefinition>)

Adds a relation definition.

#### Declaration

```csharp
public FluentMemberGroup AddRelationDefinition(string name, RelationRole role, FluentEntityDefinition entityDefinition, Action<IRelationDefinition> initializer = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | The name of the relation definition. |
| [RelationRole](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.framework.essentials.loadoptions.relationrole.html) | role | The role. |
| [FluentEntityDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluententitydefinition.html) | entityDefinition | The entity definition. |
| Action<>[IRelationDefinition](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.irelationdefinition.html) | initializer | The relation definition initializer. |

#### Returns

| Type | Description |
| --- | --- |
| [FluentMemberGroup](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluentmembergroup.html) | The [FluentMemberGroup](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluentmembergroup.html). |

### RemoveDefinition(string)

Removes a member definition by its name.

#### Declaration

```csharp
public FluentMemberGroup RemoveDefinition(string name)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | The name of the member definition. |

#### Returns

| Type | Description |
| --- | --- |
| [FluentMemberGroup](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluentmembergroup.html) | The [FluentMemberGroup](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.models.fluentmembergroup.html). |

### Extension Methods

[FluentMemberGroupExtensions.AssertPropertyExists(FluentMemberGroup, string)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluentmembergroupextensions.html)

[FluentMemberGroupExtensions.AssertRelationExists(FluentMemberGroup, string, RelationRole?, FluentEntityDefinition)](https://doc.sitecore.com/ch/en/developers/api-reference/fluent-sdk--stylelabs.m.sdk.fluent.testing.extensions.fluentmembergroupextensions.html)
