mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-08-20 09:31:10 +08:00
parent
4c463287ca
commit
d310fb56e1
16
src/Orchard/Data/Conventions/LazyLoadConvention.cs
Normal file
16
src/Orchard/Data/Conventions/LazyLoadConvention.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using FluentNHibernate.Conventions;
|
||||
using FluentNHibernate.Conventions.Instances;
|
||||
|
||||
namespace Orchard.Data.Conventions
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public class LazyLoadAttribute : Attribute {
|
||||
}
|
||||
|
||||
public class LazyLoadConvention : AttributePropertyConvention<LazyLoadAttribute> {
|
||||
protected override void Apply(LazyLoadAttribute attribute, IPropertyInstance instance) {
|
||||
instance.LazyLoad();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -147,6 +147,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="ContentManagement\Extensions\DriverResultExtensions.cs" />
|
||||
<Compile Include="ContentManagement\Handlers\CloneContentContext.cs" />
|
||||
<Compile Include="Data\Conventions\LazyLoadConvention.cs" />
|
||||
<Compile Include="Data\MapAsRecordAttribute.cs" />
|
||||
<Compile Include="Data\Migration\Interpreters\PostgreSqlCommandInterpreter.cs" />
|
||||
<Compile Include="DisplayManagement\Descriptors\ShapePlacementStrategy\DefaultPlacementParseMatchProviders.cs" />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user