# Class NpgsqlCreateDatabaseOperation

Namespace
  Npgsql.EntityFrameworkCore.PostgreSQL.Migrations.Operations

Assembly
  Npgsql.EntityFrameworkCore.PostgreSQL.dll

A PostgreSQL-specific MigrationOperation to create a database.

    public class NpgsqlCreateDatabaseOperation : DatabaseOperation, IAnnotatable, IMutableAnnotatable, IReadOnlyAnnotatable

Inheritance
  object
  AnnotatableBase
  Annotatable
  MigrationOperation
  DatabaseOperation
  NpgsqlCreateDatabaseOperation

Implements
  IAnnotatable
  IMutableAnnotatable
  IReadOnlyAnnotatable

Inherited Members
  DatabaseOperation.Collation
  MigrationOperation.IsDestructiveChange
  Annotatable.EnsureReadOnly()
  Annotatable.EnsureMutable()
  AnnotatableBase.GetAnnotations()
  AnnotatableBase.AddAnnotation(string, object)
  AnnotatableBase.AddAnnotation(string, Annotation)
  AnnotatableBase.AddAnnotations(IEnumerable<IAnnotation>)
  AnnotatableBase.AddAnnotations(IReadOnlyDictionary<string, object>)
  AnnotatableBase.SetAnnotation(string, object)
  AnnotatableBase.SetAnnotation(string, Annotation, Annotation)
  AnnotatableBase.OnAnnotationSet(string, Annotation, Annotation)
  AnnotatableBase.FindAnnotation(string)
  AnnotatableBase.GetAnnotation(string)
  AnnotatableBase.RemoveAnnotation(string)
  AnnotatableBase.CreateAnnotation(string, object)
  AnnotatableBase.GetRuntimeAnnotations()
  AnnotatableBase.AddRuntimeAnnotation(string, object)
  AnnotatableBase.AddRuntimeAnnotation(string, Annotation)
  AnnotatableBase.AddRuntimeAnnotations(IEnumerable<Annotation>)
  AnnotatableBase.AddRuntimeAnnotations(IReadOnlyDictionary<string, object>)
  AnnotatableBase.SetRuntimeAnnotation(string, object)
  AnnotatableBase.SetRuntimeAnnotation(string, Annotation, Annotation)
  AnnotatableBase.GetOrAddRuntimeAnnotationValue<TValue, TArg>(string, Func<TArg, TValue>, TArg)
  AnnotatableBase.FindRuntimeAnnotation(string)
  AnnotatableBase.RemoveRuntimeAnnotation(string)
  AnnotatableBase.CreateRuntimeAnnotation(string, object)
  AnnotatableBase.IsReadOnly
  AnnotatableBase.this[string]
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Remarks

See Database migrations.

## Properties

### Name

The name of the database.

    public virtual string Name { get; set; }

#### Property Value

string

### Tablespace

The PostgreSQL tablespace in which to create the database.

    public virtual string? Tablespace { get; set; }

#### Property Value

string

### Template

The PostgreSQL database to use as a template for the new database to be created.

    public virtual string? Template { get; set; }

#### Property Value

string