Add CollectionName attribute for allowing explicit naming of collections

This commit is contained in:
Andrea Bertoldo
2018-02-05 14:48:26 +01:00
parent c50e4d086e
commit c117bf2a7f
5 changed files with 46 additions and 18 deletions
@@ -0,0 +1,15 @@
using System;
namespace MongoDbGenericRepository.Attributes
{
[AttributeUsage(AttributeTargets.Class)]
public class CollectionNameAttribute : Attribute
{
public string Name { get; set; }
public CollectionNameAttribute(string name)
{
this.Name = name;
}
}
}