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

# EdmxGenerateCommand

> Command to generate an EDMX file from an EF Core DbContext in the Data project.

## Definition

**Assembly:** CloudNimble.EasyAF.Tools.dll

**Namespace:** CloudNimble.EasyAF.Tools.Commands

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
CloudNimble.EasyAF.Tools.Commands.EdmxGenerateCommand
```

## Summary

Command to generate an EDMX file from an EF Core DbContext in the Data project.

## Remarks

This command locates the Data project, finds the compiled assembly, and generates an EDMX file
using the `EdmxConverter`. The output file is placed in the Data project directory.

## Examples

```csharp theme={"dark"}
dotnet easyaf edmx generate --path "C:\MySolution"
```

## Constructors

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

Initializes a new instance of the [EdmxGenerateCommand](/api-reference/CloudNimble/EasyAF/Tools/Commands/EdmxGenerateCommand) class.

#### Syntax

```csharp theme={"dark"}
public EdmxGenerateCommand(CloudNimble.EasyAF.EFCoreToEdmx.EdmxConverter converter)
```

#### Parameters

| Name        | Type                                            | Description                 |
| ----------- | ----------------------------------------------- | --------------------------- |
| `converter` | `CloudNimble.EasyAF.EFCoreToEdmx.EdmxConverter` | The EDMX converter service. |

### <Icon icon="hammer" iconType="duotone" color="#E0EC32" 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="#E0EC32" size={24} className="mr-2" /> Context

Gets or sets the DbContext class to use.

#### Syntax

```csharp theme={"dark"}
public string Context { get; set; }
```

#### Property Value

Type: `string`

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

Gets or sets the environment to use (Development, Production, etc).

#### Syntax

```csharp theme={"dark"}
public string Environment { get; set; }
```

#### Property Value

Type: `string`

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

Gets or sets the project folder containing the DbContext.

#### Syntax

```csharp theme={"dark"}
public string Project { get; set; }
```

#### Property Value

Type: `string`

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

Gets or sets the working directory for the code compiler. Defaults to current directory.

#### Syntax

```csharp theme={"dark"}
public string Root { get; set; }
```

#### Property Value

Type: `string`

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

Gets or sets the startup project folder.

#### Syntax

```csharp theme={"dark"}
public string StartupProject { get; set; }
```

#### Property Value

Type: `string`

## Methods

### <Icon icon="code-fork" iconType="duotone" color="#E0EC32" 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="#E0EC32" 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="#E0EC32" 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="#E0EC32" 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="#E0EC32" 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="function" iconType="duotone" color="#E0EC32" size={24} className="mr-2" /> OnExecuteAsync

Executes the EDMX generation command.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.Task<int> OnExecuteAsync()
```

#### Returns

Type: `System.Threading.Tasks.Task<int>`
0 if successful, 1 if an error occurred.

#### Examples

```csharp theme={"dark"}
dotnet easyaf edmx generate --path "C:\MySolution"
```

### <Icon icon="thumbtack" iconType="duotone" color="#E0EC32" 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="#E0EC32" 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?`
