DbContextModuleAssignmentAttribute.cs 480 B

123456789101112131415
  1. namespace Quadarax.Application.QLiberace.Common.Attributes
  2. {
  3. [AttributeUsage(AttributeTargets.Class)]
  4. public class DbContextModuleAssignmentAttribute : Attribute
  5. {
  6. public string ModuleCode { get; set; }
  7. public DbContextModuleAssignmentAttribute(string moduleCode)
  8. {
  9. if (string.IsNullOrEmpty(moduleCode)) throw new ArgumentNullException(nameof(moduleCode));
  10. ModuleCode = moduleCode;
  11. }
  12. }
  13. }