Mercurial > pub > bltoolkit
comparison Source/DataAccess/NonUpdatableAttribute.cs @ 0:f990fcb411a9
Копия текущей версии из github
author | cin |
---|---|
date | Thu, 27 Mar 2014 21:46:09 +0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f990fcb411a9 |
---|---|
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 } |