PageRenderTime 53ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/ImageData/Generated/Image.cs

https://bitbucket.org/mahalowe/bvcms
C# | 203 lines | 141 code | 62 blank | 0 comment | 14 complexity | 0d73fa7d6faa6db060a00205a90bb0a1 MD5 | raw file
Possible License(s): CC-BY-SA-3.0, Apache-2.0, BSD-3-Clause, LGPL-2.1, MPL-2.0-no-copyleft-exception, AGPL-3.0
  1. using System;
  2. using System.Data.Linq;
  3. using System.Data.Linq.Mapping;
  4. using System.Data;
  5. using System.Collections.Generic;
  6. using System.Reflection;
  7. using System.Linq;
  8. using System.Linq.Expressions;
  9. using System.ComponentModel;
  10. namespace ImageData
  11. {
  12. [Table(Name="dbo.Image")]
  13. public partial class Image : INotifyPropertyChanging, INotifyPropertyChanged
  14. {
  15. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  16. #region Private Fields
  17. private int _Id;
  18. private byte[] _Bits;
  19. private int? _Length;
  20. private string _Mimetype;
  21. private bool? _Secure;
  22. #endregion
  23. #region Extensibility Method Definitions
  24. partial void OnLoaded();
  25. partial void OnValidate(System.Data.Linq.ChangeAction action);
  26. partial void OnCreated();
  27. partial void OnIdChanging(int value);
  28. partial void OnIdChanged();
  29. partial void OnBitsChanging(byte[] value);
  30. partial void OnBitsChanged();
  31. partial void OnLengthChanging(int? value);
  32. partial void OnLengthChanged();
  33. partial void OnMimetypeChanging(string value);
  34. partial void OnMimetypeChanged();
  35. partial void OnSecureChanging(bool? value);
  36. partial void OnSecureChanged();
  37. #endregion
  38. public Image()
  39. {
  40. OnCreated();
  41. }
  42. #region Columns
  43. [Column(Name="Id", UpdateCheck=UpdateCheck.Never, Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
  44. public int Id
  45. {
  46. get { return this._Id; }
  47. set
  48. {
  49. if (this._Id != value)
  50. {
  51. this.OnIdChanging(value);
  52. this.SendPropertyChanging();
  53. this._Id = value;
  54. this.SendPropertyChanged("Id");
  55. this.OnIdChanged();
  56. }
  57. }
  58. }
  59. [Column(Name="bits", UpdateCheck=UpdateCheck.Never, Storage="_Bits", DbType="varbinary")]
  60. public byte[] Bits
  61. {
  62. get { return this._Bits; }
  63. set
  64. {
  65. if (this._Bits != value)
  66. {
  67. this.OnBitsChanging(value);
  68. this.SendPropertyChanging();
  69. this._Bits = value;
  70. this.SendPropertyChanged("Bits");
  71. this.OnBitsChanged();
  72. }
  73. }
  74. }
  75. [Column(Name="length", UpdateCheck=UpdateCheck.Never, Storage="_Length", DbType="int")]
  76. public int? Length
  77. {
  78. get { return this._Length; }
  79. set
  80. {
  81. if (this._Length != value)
  82. {
  83. this.OnLengthChanging(value);
  84. this.SendPropertyChanging();
  85. this._Length = value;
  86. this.SendPropertyChanged("Length");
  87. this.OnLengthChanged();
  88. }
  89. }
  90. }
  91. [Column(Name="mimetype", UpdateCheck=UpdateCheck.Never, Storage="_Mimetype", DbType="varchar(20)")]
  92. public string Mimetype
  93. {
  94. get { return this._Mimetype; }
  95. set
  96. {
  97. if (this._Mimetype != value)
  98. {
  99. this.OnMimetypeChanging(value);
  100. this.SendPropertyChanging();
  101. this._Mimetype = value;
  102. this.SendPropertyChanged("Mimetype");
  103. this.OnMimetypeChanged();
  104. }
  105. }
  106. }
  107. [Column(Name="secure", UpdateCheck=UpdateCheck.Never, Storage="_Secure", DbType="bit")]
  108. public bool? Secure
  109. {
  110. get { return this._Secure; }
  111. set
  112. {
  113. if (this._Secure != value)
  114. {
  115. this.OnSecureChanging(value);
  116. this.SendPropertyChanging();
  117. this._Secure = value;
  118. this.SendPropertyChanged("Secure");
  119. this.OnSecureChanged();
  120. }
  121. }
  122. }
  123. #endregion
  124. #region Foreign Key Tables
  125. #endregion
  126. #region Foreign Keys
  127. #endregion
  128. public event PropertyChangingEventHandler PropertyChanging;
  129. protected virtual void SendPropertyChanging()
  130. {
  131. if ((this.PropertyChanging != null))
  132. this.PropertyChanging(this, emptyChangingEventArgs);
  133. }
  134. public event PropertyChangedEventHandler PropertyChanged;
  135. protected virtual void SendPropertyChanged(String propertyName)
  136. {
  137. if ((this.PropertyChanged != null))
  138. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  139. }
  140. }
  141. }