0
|
1 using System;
|
|
2
|
|
3 namespace BLToolkit.DataAccess
|
|
4 {
|
|
5 [Serializable]
|
|
6 [AttributeUsage(
|
|
7 AttributeTargets.Field | AttributeTargets.Property |
|
|
8 AttributeTargets.Class | AttributeTargets.Interface,
|
|
9 AllowMultiple = true)]
|
|
10 public class NonUpdatableAttribute : Attribute
|
|
11 {
|
|
12 public NonUpdatableAttribute()
|
|
13 : this(true, true, false)
|
|
14 {
|
|
15 }
|
|
16
|
|
17 public NonUpdatableAttribute(bool onInsert, bool onUpdate, bool isIdentity)
|
|
18 {
|
|
19 OnInsert = onInsert;
|
|
20 OnUpdate = onUpdate;
|
|
21 IsIdentity = isIdentity;
|
|
22 }
|
|
23
|
|
24 public bool OnInsert { get; set; }
|
|
25 public bool OnUpdate { get; set; }
|
|
26 public bool IsIdentity { get; set; }
|
|
27 public string FieldName { get; set; }
|
|
28 }
|
|
29 }
|