Add project files.
This commit is contained in:
		
							
								
								
									
										24
									
								
								Core.Blueprint.Mongo/Attributes/CollectionAttributeName.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								Core.Blueprint.Mongo/Attributes/CollectionAttributeName.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| namespace Core.Blueprint.Mongo | ||||
| { | ||||
|     /// <summary> | ||||
|     /// The <see cref="CollectionAttributeName"/> attribute is used to specify the name of a MongoDB collection  | ||||
|     /// that a class should be mapped to. This attribute can be applied to classes that represent MongoDB entities. | ||||
|     /// </summary> | ||||
|     [AttributeUsage(AttributeTargets.Class)]  // This attribute can only be applied to classes. | ||||
|     public class CollectionAttributeName : Attribute | ||||
|     { | ||||
|         /// <summary> | ||||
|         /// Gets or sets the name of the MongoDB collection that the class is mapped to. | ||||
|         /// </summary> | ||||
|         public string Name { get; set; } | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Initializes a new instance of the <see cref="CollectionAttributeName"/> class with the specified collection name. | ||||
|         /// </summary> | ||||
|         /// <param name="name">The name of the MongoDB collection that the class should be mapped to.</param> | ||||
|         public CollectionAttributeName(string name) | ||||
|         { | ||||
|             Name = name ?? throw new ArgumentNullException(nameof(name), "Collection name cannot be null."); | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Sergio Matias Urquin
					Sergio Matias Urquin