Table of Contents

Class CollectionAttribute

Namespace
MongoDB.EntityFrameworkCore
Assembly
MongoDB.EntityFrameworkCore.dll

Specifies the collection that an entity is mapped to.

[AttributeUsage(AttributeTargets.Class)]
public class CollectionAttribute : Attribute
Inheritance
CollectionAttribute
Inherited Members

Constructors

CollectionAttribute(string)

Creates a CollectionAttribute with the required collection name.

Properties

Name

The name of the collection the type is mapped to.