> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# AuthorizationEntry

> Describes the methods of verifying various CRUD operations for a given EF Entity. Useful in code generation scenarios

## Definition

**Assembly:** Microsoft.Restier.Core.dll

**Namespace:** Microsoft.Restier.Core.Authorization

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
Microsoft.Restier.Core.Authorization.AuthorizationEntry
```

## Summary

Describes the methods of verifying various CRUD operations for a given EF Entity. Useful in code generation scenarios

## Constructors

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> .ctor

Creates a new instance of an [AuthorizationEntry](/restier/api-reference/Microsoft/Restier/Core/Authorization/AuthorizationEntry) for a given [AuthorizationEntry.Type](/restier/api-reference/Microsoft/Restier/Core/Authorization/AuthorizationEntry#type). Assumes all authorization checks will return false by default.

#### Syntax

```csharp theme={"dark"}
public AuthorizationEntry(System.Type t)
```

#### Parameters

| Name | Type          | Description                                                                                                                                            |
| ---- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `t`  | `System.Type` | The [AuthorizationEntry.Type](/restier/api-reference/Microsoft/Restier/Core/Authorization/AuthorizationEntry#type) to track authorization methods for. |

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> .ctor

Creates a new instance of an [AuthorizationEntry](/restier/api-reference/Microsoft/Restier/Core/Authorization/AuthorizationEntry) for a given [AuthorizationEntry.Type](/restier/api-reference/Microsoft/Restier/Core/Authorization/AuthorizationEntry#type) while allowing you to specify the action to run when authorizing Inserts.

#### Syntax

```csharp theme={"dark"}
public AuthorizationEntry(System.Type t, System.Func<bool> canInsertAction)
```

#### Parameters

| Name              | Type                | Description                                                                                                                                                                                                                        |
| ----------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `t`               | `System.Type`       | The [AuthorizationEntry.Type](/restier/api-reference/Microsoft/Restier/Core/Authorization/AuthorizationEntry#type) to track authorization methods for.                                                                             |
| `canInsertAction` | `System.Func<bool>` | A [Func\`1](https://learn.microsoft.com/dotnet/api/system.func-1) that evaluates to a [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) specifying whether or not a record can be inserted through the Restier API. |

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> .ctor

Creates a new instance of an [AuthorizationEntry](/restier/api-reference/Microsoft/Restier/Core/Authorization/AuthorizationEntry) for a given [AuthorizationEntry.Type](/restier/api-reference/Microsoft/Restier/Core/Authorization/AuthorizationEntry#type) while allowing you to specify the actions to run when authorizing Inserts and Updates.

#### Syntax

```csharp theme={"dark"}
public AuthorizationEntry(System.Type t, System.Func<bool> canInsertAction, System.Func<bool> canUpdateAction)
```

#### Parameters

| Name              | Type                | Description                                                                                                                                                                                                                        |
| ----------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `t`               | `System.Type`       | The [AuthorizationEntry.Type](/restier/api-reference/Microsoft/Restier/Core/Authorization/AuthorizationEntry#type) to track authorization methods for.                                                                             |
| `canInsertAction` | `System.Func<bool>` | A [Func\`1](https://learn.microsoft.com/dotnet/api/system.func-1) that evaluates to a [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) specifying whether or not a record can be inserted through the Restier API. |
| `canUpdateAction` | `System.Func<bool>` | A [Func\`1](https://learn.microsoft.com/dotnet/api/system.func-1) that evaluates to a [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) specifying whether or not a record can be updated through the Restier API.  |

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> .ctor

Creates a new instance of an [AuthorizationEntry](/restier/api-reference/Microsoft/Restier/Core/Authorization/AuthorizationEntry) for a given [AuthorizationEntry.Type](/restier/api-reference/Microsoft/Restier/Core/Authorization/AuthorizationEntry#type) while allowing you to specify the actions to run when authorizing Inserts, Updates, and Deletes.

#### Syntax

```csharp theme={"dark"}
public AuthorizationEntry(System.Type t, System.Func<bool> canInsertAction, System.Func<bool> canUpdateAction, System.Func<bool> canDeleteAction)
```

#### Parameters

| Name              | Type                | Description                                                                                                                                                                                                                        |
| ----------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `t`               | `System.Type`       | The [AuthorizationEntry.Type](/restier/api-reference/Microsoft/Restier/Core/Authorization/AuthorizationEntry#type) to track authorization methods for.                                                                             |
| `canInsertAction` | `System.Func<bool>` | A [Func\`1](https://learn.microsoft.com/dotnet/api/system.func-1) that evaluates to a [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) specifying whether or not a record can be inserted through the Restier API. |
| `canUpdateAction` | `System.Func<bool>` | A [Func\`1](https://learn.microsoft.com/dotnet/api/system.func-1) that evaluates to a [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) specifying whether or not a record can be updated through the Restier API.  |
| `canDeleteAction` | `System.Func<bool>` | A [Func\`1](https://learn.microsoft.com/dotnet/api/system.func-1) that evaluates to a [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) specifying whether or not a record can be deleted through the Restier API.  |

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> .ctor <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public Object()
```

## Properties

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> CanDeleteAction

A [Func\`1](https://learn.microsoft.com/dotnet/api/system.func-1) that evaluates to a [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) specifying whether or not a record can be deleted through the Restier API. The default is false.

#### Syntax

```csharp theme={"dark"}
public System.Func<bool> CanDeleteAction { get; set; }
```

#### Property Value

Type: `System.Func<bool>`

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> CanInsertAction

A [Func\`1](https://learn.microsoft.com/dotnet/api/system.func-1) that evaluates to a [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) specifying whether or not a record can be inserted through the Restier API. The default is false.

#### Syntax

```csharp theme={"dark"}
public System.Func<bool> CanInsertAction { get; set; }
```

#### Property Value

Type: `System.Func<bool>`

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> CanUpdateAction

A [Func\`1](https://learn.microsoft.com/dotnet/api/system.func-1) that evaluates to a [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) specifying whether or not a record can be updated through the Restier API. The default is false.

#### Syntax

```csharp theme={"dark"}
public System.Func<bool> CanUpdateAction { get; set; }
```

#### Property Value

Type: `System.Func<bool>`

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Type

The [AuthorizationEntry.Type](/restier/api-reference/Microsoft/Restier/Core/Authorization/AuthorizationEntry#type) to register this [AuthorizationEntry](/restier/api-reference/Microsoft/Restier/Core/Authorization/AuthorizationEntry) for in the [AuthorizationFactory](/restier/api-reference/Microsoft/Restier/Core/Authorization/AuthorizationFactory)AuthorizationFactory's\</see> backing Dictionary.

#### Syntax

```csharp theme={"dark"}
public System.Type Type { get; set; }
```

#### Property Value

Type: `System.Type`

## Methods

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Equals <Badge color="gray">Inherited</Badge> <Badge color="orange">Virtual</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual bool Equals(object obj)
```

#### Parameters

| Name  | Type      | Description |
| ----- | --------- | ----------- |
| `obj` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Equals <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name   | Type      | Description |
| ------ | --------- | ----------- |
| `objA` | `object?` | -           |
| `objB` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> GetHashCode <Badge color="gray">Inherited</Badge> <Badge color="orange">Virtual</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> GetType <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> MemberwiseClone <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> ReferenceEquals <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name   | Type      | Description |
| ------ | --------- | ----------- |
| `objA` | `object?` | -           |
| `objB` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> ToString <Badge color="gray">Inherited</Badge> <Badge color="orange">Virtual</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`
