zhaolei
5 days ago 4a2e5b9a21940f11757be37d99f0944e240e908b
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
31
32
33
34
35
36
37
38
39
40
using System;
 
namespace PetaPoco
{
    public enum IncludeInAutoSelect
    {
        No,
        Yes
    }
 
    /// <summary>
    ///     Represents an attribute which can decorate a POCO property as a result only column. A result only column is a
    ///     column that is only populated in queries and is not used for updates or inserts operations.
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class ResultColumnAttribute : ColumnAttribute
    {
        public IncludeInAutoSelect IncludeInAutoSelect { get; set; }
 
        public ResultColumnAttribute()
        {
        }
 
        public ResultColumnAttribute(string name)
            : this(name, IncludeInAutoSelect.No)
        {
        }
 
        public ResultColumnAttribute(IncludeInAutoSelect includeInAutoSelect)
            : this(null, includeInAutoSelect)
        {
        }
 
        public ResultColumnAttribute(string name, IncludeInAutoSelect includeInAutoSelect)
            : base(name)
        {
            IncludeInAutoSelect = includeInAutoSelect;
        }
    }
}