Example #1
0
 public void Apply(IClassInstance instance)
 {
     if (instance.EntityType.IsSubclassOf(typeof (SiteEntity)))
     {
         instance.ApplyFilter<SiteFilter>();
     }
 }
Example #2
0
 public void Apply(IClassInstance instance)
 {
     //Table name rule
     instance.Table(instance.EntityType.Name.ToPlural());
     //To filter queries based on what I've defined in the Tenant filter definition
     instance.ApplyFilter <AppFilterDefinition>();
 }
 public void Apply(IClassInstance instance)
 {
     if (typeof(ISoftDeletable).IsAssignableFrom(instance.EntityType))
     {
         instance.ApplyFilter<SoftDeletableFilter>();
     }
 }
 public void Apply(IClassInstance instance)
 {
     if (instance.EntityType.IsSubclassOf(typeof(SiteEntity)))
     {
         instance.ApplyFilter <SiteFilter>();
     }
 }
Example #5
0
 public void Apply(IClassInstance instance)
 {
     if (typeof(ISoftDeletable).IsAssignableFrom(instance.EntityType))
     {
         instance.ApplyFilter <SoftDeletableFilter>();
     }
 }
Example #6
0
        /// <summary>
        /// Applies the specified instance.
        /// </summary>
        /// <param name="instance">The instance.</param>
        public void Apply(IClassInstance instance)
        {
            var tableName = GetTableName(instance.EntityType).ToLower();

            instance.Table($"{tableName}");

            instance.ApplyFilter <AppFilterSoftDelete>();
        }
        public virtual void Apply(IClassInstance instance)
        {
            string tableName = instance.EntityType.Name.ToDatabaseName();

            if (typeof (IPermanent).IsAssignableFrom(instance.EntityType))
            {
                instance.ApplyFilter<IsDeletedFilter>("IS_DELETED = :DeleteFlag");
            }

            instance.Table(tableName);
        }
        public virtual void Apply(IClassInstance instance)
        {
            string tableName = instance.EntityType.Name.ToDatabaseName();

            if (typeof(IPermanent).IsAssignableFrom(instance.EntityType))
            {
                instance.ApplyFilter <IsDeletedFilter>("IS_DELETED = :DeleteFlag");
            }

            instance.Table(tableName);
        }
Example #9
0
        public void Apply(IClassInstance instance)
        {
            //Table name rule
            var tableName = instance.EntityType.Name.ToPlural();

            if (ConfigurationHelper.AppSettingsItem <bool>("UseLowercaseTableNames"))
            {
                tableName = tableName.ToLowerInvariant();
            }
            instance.Table(tableName);
            //To filter queries based on what I've defined in the Tenant filter definition
            instance.ApplyFilter <AppFilterDefinition>();
        }
 public void Apply(IClassInstance instance)
 {
     instance.ApplyFilter(FilterName, FilterCondition);
 }
Example #11
0
 public void Apply(IClassInstance instance)
 {
     instance.ApplyFilter(FilterName);
 }
 public void Apply(IClassInstance instance)
 {
     instance.ApplyFilter<NotDeletedFilter>();
 }
Example #13
0
 public void Apply(IClassInstance instance)
 {            
     instance.ApplyFilter<TenantFilter>();
     instance.ApplyFilter<DeletedFilter>();            
 }
 public void Apply(IClassInstance instance)
 {
     instance.ApplyFilter <NotDeletedFilter>();
 }
 public void Apply(IClassInstance instance)
 {
     instance.ApplyFilter(FilterName, FilterCondition);
 }
Example #16
0
 public void Apply(IClassInstance instance)
 {
     instance.ApplyFilter <TenantFilter>();
 }