-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathProjectableAttribute.cs
More file actions
30 lines (27 loc) · 1.1 KB
/
ProjectableAttribute.cs
File metadata and controls
30 lines (27 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
namespace EntityFrameworkCore.Projectables
{
/// <summary>
/// Declares this property or method to be Projectable.
/// A companion Expression tree will be generated
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
public sealed class ProjectableAttribute : Attribute
{
/// <summary>
/// Get or set how null-conditional operators are handeled
/// </summary>
public NullConditionalRewriteSupport NullConditionalRewriteSupport { get; set; }
/// <summary>
/// Get or set from which member to get the expression,
/// or null to get it from the current member.
/// </summary>
public string? UseMemberBody { get; set; }
/// <summary>
/// <c>true</c> will allow you to request for this property by
/// explicitly calling .Include(x => x.Property) on the query,
/// <c>false</c> will always consider this query to be included.
/// </summary>
public bool OnlyOnInclude { get; set; }
}
}