PageRenderTime 65ms CodeModel.GetById 31ms RepoModel.GetById 0ms app.codeStats 0ms

/CodeCamp/CodeCamp/Controllers/CodeCampData02.designer.cs

https://bitbucket.org/dsargent/codecamp
C# | 2066 lines | 1838 code | 219 blank | 9 comment | 198 complexity | 5a25a9ab645d45ab90aac733db352e64 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1. #pragma warning disable 1591
  2. //------------------------------------------------------------------------------
  3. // <auto-generated>
  4. // This code was generated by a tool.
  5. // Runtime Version:4.0.30319.1
  6. //
  7. // Changes to this file may cause incorrect behavior and will be lost if
  8. // the code is regenerated.
  9. // </auto-generated>
  10. //------------------------------------------------------------------------------
  11. namespace CodeCamp.Controllers
  12. {
  13. using System.Data.Linq;
  14. using System.Data.Linq.Mapping;
  15. using System.Data;
  16. using System.Collections.Generic;
  17. using System.Reflection;
  18. using System.Linq;
  19. using System.Linq.Expressions;
  20. [global::System.Data.Linq.Mapping.DatabaseAttribute(Name="SQL2008_499609_pdxcodecamp")]
  21. public partial class CodeCampData02DataContext : System.Data.Linq.DataContext
  22. {
  23. private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
  24. #region Extensibility Method Definitions
  25. partial void OnCreated();
  26. partial void InsertBuilding(CodeCamp.Entities02.Building instance);
  27. partial void UpdateBuilding(CodeCamp.Entities02.Building instance);
  28. partial void DeleteBuilding(CodeCamp.Entities02.Building instance);
  29. partial void InsertRoom(CodeCamp.Entities02.Room instance);
  30. partial void UpdateRoom(CodeCamp.Entities02.Room instance);
  31. partial void DeleteRoom(CodeCamp.Entities02.Room instance);
  32. partial void InsertScheduledSession(CodeCamp.Entities02.ScheduledSession instance);
  33. partial void UpdateScheduledSession(CodeCamp.Entities02.ScheduledSession instance);
  34. partial void DeleteScheduledSession(CodeCamp.Entities02.ScheduledSession instance);
  35. partial void InsertTimeslot(CodeCamp.Entities02.Timeslot instance);
  36. partial void UpdateTimeslot(CodeCamp.Entities02.Timeslot instance);
  37. partial void DeleteTimeslot(CodeCamp.Entities02.Timeslot instance);
  38. partial void InsertEvent(CodeCamp.Entities02.Event instance);
  39. partial void UpdateEvent(CodeCamp.Entities02.Event instance);
  40. partial void DeleteEvent(CodeCamp.Entities02.Event instance);
  41. partial void InsertSession(CodeCamp.Entities02.Session instance);
  42. partial void UpdateSession(CodeCamp.Entities02.Session instance);
  43. partial void DeleteSession(CodeCamp.Entities02.Session instance);
  44. partial void InsertSessionPresenter(CodeCamp.Entities02.SessionPresenter instance);
  45. partial void UpdateSessionPresenter(CodeCamp.Entities02.SessionPresenter instance);
  46. partial void DeleteSessionPresenter(CodeCamp.Entities02.SessionPresenter instance);
  47. partial void InsertPresenter(CodeCamp.Entities02.Presenter instance);
  48. partial void UpdatePresenter(CodeCamp.Entities02.Presenter instance);
  49. partial void DeletePresenter(CodeCamp.Entities02.Presenter instance);
  50. #endregion
  51. public CodeCampData02DataContext() :
  52. base(global::System.Configuration.ConfigurationManager.ConnectionStrings["CodeCampConnectionString"].ConnectionString, mappingSource)
  53. {
  54. OnCreated();
  55. }
  56. public CodeCampData02DataContext(string connection) :
  57. base(connection, mappingSource)
  58. {
  59. OnCreated();
  60. }
  61. public CodeCampData02DataContext(System.Data.IDbConnection connection) :
  62. base(connection, mappingSource)
  63. {
  64. OnCreated();
  65. }
  66. public CodeCampData02DataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
  67. base(connection, mappingSource)
  68. {
  69. OnCreated();
  70. }
  71. public CodeCampData02DataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
  72. base(connection, mappingSource)
  73. {
  74. OnCreated();
  75. }
  76. public System.Data.Linq.Table<CodeCamp.Entities02.Building> Buildings
  77. {
  78. get
  79. {
  80. return this.GetTable<CodeCamp.Entities02.Building>();
  81. }
  82. }
  83. public System.Data.Linq.Table<CodeCamp.Entities02.Room> Rooms
  84. {
  85. get
  86. {
  87. return this.GetTable<CodeCamp.Entities02.Room>();
  88. }
  89. }
  90. public System.Data.Linq.Table<CodeCamp.Entities02.ScheduledSession> ScheduledSessions
  91. {
  92. get
  93. {
  94. return this.GetTable<CodeCamp.Entities02.ScheduledSession>();
  95. }
  96. }
  97. public System.Data.Linq.Table<CodeCamp.Entities02.Timeslot> Timeslots
  98. {
  99. get
  100. {
  101. return this.GetTable<CodeCamp.Entities02.Timeslot>();
  102. }
  103. }
  104. public System.Data.Linq.Table<CodeCamp.Entities02.Event> Events
  105. {
  106. get
  107. {
  108. return this.GetTable<CodeCamp.Entities02.Event>();
  109. }
  110. }
  111. public System.Data.Linq.Table<CodeCamp.Entities02.Session> Sessions
  112. {
  113. get
  114. {
  115. return this.GetTable<CodeCamp.Entities02.Session>();
  116. }
  117. }
  118. public System.Data.Linq.Table<CodeCamp.Entities02.SessionPresenter> SessionPresenters
  119. {
  120. get
  121. {
  122. return this.GetTable<CodeCamp.Entities02.SessionPresenter>();
  123. }
  124. }
  125. public System.Data.Linq.Table<CodeCamp.Entities02.Presenter> Presenters
  126. {
  127. get
  128. {
  129. return this.GetTable<CodeCamp.Entities02.Presenter>();
  130. }
  131. }
  132. }
  133. }
  134. namespace CodeCamp.Entities02
  135. {
  136. using System.Data.Linq;
  137. using System.Data.Linq.Mapping;
  138. using System.ComponentModel;
  139. using System;
  140. [global::System.Data.Linq.Mapping.TableAttribute(Name="CodeCamp02_Schedule.Buildings")]
  141. public partial class Building : INotifyPropertyChanging, INotifyPropertyChanged
  142. {
  143. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  144. private int _Id;
  145. private int _EventId;
  146. private string _Name;
  147. private EntitySet<Room> _Rooms;
  148. private EntityRef<Event> _Event;
  149. #region Extensibility Method Definitions
  150. partial void OnLoaded();
  151. partial void OnValidate(System.Data.Linq.ChangeAction action);
  152. partial void OnCreated();
  153. partial void OnIdChanging(int value);
  154. partial void OnIdChanged();
  155. partial void OnEventIdChanging(int value);
  156. partial void OnEventIdChanged();
  157. partial void OnNameChanging(string value);
  158. partial void OnNameChanged();
  159. #endregion
  160. public Building()
  161. {
  162. this._Rooms = new EntitySet<Room>(new Action<Room>(this.attach_Rooms), new Action<Room>(this.detach_Rooms));
  163. this._Event = default(EntityRef<Event>);
  164. OnCreated();
  165. }
  166. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
  167. public int Id
  168. {
  169. get
  170. {
  171. return this._Id;
  172. }
  173. set
  174. {
  175. if ((this._Id != value))
  176. {
  177. this.OnIdChanging(value);
  178. this.SendPropertyChanging();
  179. this._Id = value;
  180. this.SendPropertyChanged("Id");
  181. this.OnIdChanged();
  182. }
  183. }
  184. }
  185. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EventId", DbType="Int NOT NULL")]
  186. public int EventId
  187. {
  188. get
  189. {
  190. return this._EventId;
  191. }
  192. set
  193. {
  194. if ((this._EventId != value))
  195. {
  196. if (this._Event.HasLoadedOrAssignedValue)
  197. {
  198. throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
  199. }
  200. this.OnEventIdChanging(value);
  201. this.SendPropertyChanging();
  202. this._EventId = value;
  203. this.SendPropertyChanged("EventId");
  204. this.OnEventIdChanged();
  205. }
  206. }
  207. }
  208. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(128) NOT NULL", CanBeNull=false)]
  209. public string Name
  210. {
  211. get
  212. {
  213. return this._Name;
  214. }
  215. set
  216. {
  217. if ((this._Name != value))
  218. {
  219. this.OnNameChanging(value);
  220. this.SendPropertyChanging();
  221. this._Name = value;
  222. this.SendPropertyChanged("Name");
  223. this.OnNameChanged();
  224. }
  225. }
  226. }
  227. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Building_Room", Storage="_Rooms", ThisKey="Id", OtherKey="BuildingId")]
  228. public EntitySet<Room> Rooms
  229. {
  230. get
  231. {
  232. return this._Rooms;
  233. }
  234. set
  235. {
  236. this._Rooms.Assign(value);
  237. }
  238. }
  239. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Event_Building", Storage="_Event", ThisKey="EventId", OtherKey="Id", IsForeignKey=true)]
  240. public Event Event
  241. {
  242. get
  243. {
  244. return this._Event.Entity;
  245. }
  246. set
  247. {
  248. Event previousValue = this._Event.Entity;
  249. if (((previousValue != value)
  250. || (this._Event.HasLoadedOrAssignedValue == false)))
  251. {
  252. this.SendPropertyChanging();
  253. if ((previousValue != null))
  254. {
  255. this._Event.Entity = null;
  256. previousValue.Buildings.Remove(this);
  257. }
  258. this._Event.Entity = value;
  259. if ((value != null))
  260. {
  261. value.Buildings.Add(this);
  262. this._EventId = value.Id;
  263. }
  264. else
  265. {
  266. this._EventId = default(int);
  267. }
  268. this.SendPropertyChanged("Event");
  269. }
  270. }
  271. }
  272. public event PropertyChangingEventHandler PropertyChanging;
  273. public event PropertyChangedEventHandler PropertyChanged;
  274. protected virtual void SendPropertyChanging()
  275. {
  276. if ((this.PropertyChanging != null))
  277. {
  278. this.PropertyChanging(this, emptyChangingEventArgs);
  279. }
  280. }
  281. protected virtual void SendPropertyChanged(String propertyName)
  282. {
  283. if ((this.PropertyChanged != null))
  284. {
  285. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  286. }
  287. }
  288. private void attach_Rooms(Room entity)
  289. {
  290. this.SendPropertyChanging();
  291. entity.Building = this;
  292. }
  293. private void detach_Rooms(Room entity)
  294. {
  295. this.SendPropertyChanging();
  296. entity.Building = null;
  297. }
  298. }
  299. [global::System.Data.Linq.Mapping.TableAttribute(Name="CodeCamp02_Schedule.Rooms")]
  300. public partial class Room : INotifyPropertyChanging, INotifyPropertyChanged
  301. {
  302. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  303. private int _Id;
  304. private int _BuildingId;
  305. private string _Name;
  306. private EntitySet<ScheduledSession> _ScheduledSessions;
  307. private EntityRef<Building> _Building;
  308. #region Extensibility Method Definitions
  309. partial void OnLoaded();
  310. partial void OnValidate(System.Data.Linq.ChangeAction action);
  311. partial void OnCreated();
  312. partial void OnIdChanging(int value);
  313. partial void OnIdChanged();
  314. partial void OnBuildingIdChanging(int value);
  315. partial void OnBuildingIdChanged();
  316. partial void OnNameChanging(string value);
  317. partial void OnNameChanged();
  318. #endregion
  319. public Room()
  320. {
  321. this._ScheduledSessions = new EntitySet<ScheduledSession>(new Action<ScheduledSession>(this.attach_ScheduledSessions), new Action<ScheduledSession>(this.detach_ScheduledSessions));
  322. this._Building = default(EntityRef<Building>);
  323. OnCreated();
  324. }
  325. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
  326. public int Id
  327. {
  328. get
  329. {
  330. return this._Id;
  331. }
  332. set
  333. {
  334. if ((this._Id != value))
  335. {
  336. this.OnIdChanging(value);
  337. this.SendPropertyChanging();
  338. this._Id = value;
  339. this.SendPropertyChanged("Id");
  340. this.OnIdChanged();
  341. }
  342. }
  343. }
  344. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BuildingId", DbType="Int NOT NULL")]
  345. public int BuildingId
  346. {
  347. get
  348. {
  349. return this._BuildingId;
  350. }
  351. set
  352. {
  353. if ((this._BuildingId != value))
  354. {
  355. if (this._Building.HasLoadedOrAssignedValue)
  356. {
  357. throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
  358. }
  359. this.OnBuildingIdChanging(value);
  360. this.SendPropertyChanging();
  361. this._BuildingId = value;
  362. this.SendPropertyChanged("BuildingId");
  363. this.OnBuildingIdChanged();
  364. }
  365. }
  366. }
  367. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(128) NOT NULL", CanBeNull=false)]
  368. public string Name
  369. {
  370. get
  371. {
  372. return this._Name;
  373. }
  374. set
  375. {
  376. if ((this._Name != value))
  377. {
  378. this.OnNameChanging(value);
  379. this.SendPropertyChanging();
  380. this._Name = value;
  381. this.SendPropertyChanged("Name");
  382. this.OnNameChanged();
  383. }
  384. }
  385. }
  386. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Room_ScheduledSession", Storage="_ScheduledSessions", ThisKey="Id", OtherKey="RoomId")]
  387. public EntitySet<ScheduledSession> ScheduledSessions
  388. {
  389. get
  390. {
  391. return this._ScheduledSessions;
  392. }
  393. set
  394. {
  395. this._ScheduledSessions.Assign(value);
  396. }
  397. }
  398. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Building_Room", Storage="_Building", ThisKey="BuildingId", OtherKey="Id", IsForeignKey=true)]
  399. public Building Building
  400. {
  401. get
  402. {
  403. return this._Building.Entity;
  404. }
  405. set
  406. {
  407. Building previousValue = this._Building.Entity;
  408. if (((previousValue != value)
  409. || (this._Building.HasLoadedOrAssignedValue == false)))
  410. {
  411. this.SendPropertyChanging();
  412. if ((previousValue != null))
  413. {
  414. this._Building.Entity = null;
  415. previousValue.Rooms.Remove(this);
  416. }
  417. this._Building.Entity = value;
  418. if ((value != null))
  419. {
  420. value.Rooms.Add(this);
  421. this._BuildingId = value.Id;
  422. }
  423. else
  424. {
  425. this._BuildingId = default(int);
  426. }
  427. this.SendPropertyChanged("Building");
  428. }
  429. }
  430. }
  431. public event PropertyChangingEventHandler PropertyChanging;
  432. public event PropertyChangedEventHandler PropertyChanged;
  433. protected virtual void SendPropertyChanging()
  434. {
  435. if ((this.PropertyChanging != null))
  436. {
  437. this.PropertyChanging(this, emptyChangingEventArgs);
  438. }
  439. }
  440. protected virtual void SendPropertyChanged(String propertyName)
  441. {
  442. if ((this.PropertyChanged != null))
  443. {
  444. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  445. }
  446. }
  447. private void attach_ScheduledSessions(ScheduledSession entity)
  448. {
  449. this.SendPropertyChanging();
  450. entity.Room = this;
  451. }
  452. private void detach_ScheduledSessions(ScheduledSession entity)
  453. {
  454. this.SendPropertyChanging();
  455. entity.Room = null;
  456. }
  457. }
  458. [global::System.Data.Linq.Mapping.TableAttribute(Name="CodeCamp02_Schedule.ScheduledSessions")]
  459. public partial class ScheduledSession : INotifyPropertyChanging, INotifyPropertyChanged
  460. {
  461. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  462. private int _Id;
  463. private int _SessionId;
  464. private int _TimeslotId;
  465. private int _RoomId;
  466. private EntityRef<Room> _Room;
  467. private EntityRef<Timeslot> _Timeslot;
  468. private EntityRef<Session> _Session;
  469. #region Extensibility Method Definitions
  470. partial void OnLoaded();
  471. partial void OnValidate(System.Data.Linq.ChangeAction action);
  472. partial void OnCreated();
  473. partial void OnIdChanging(int value);
  474. partial void OnIdChanged();
  475. partial void OnSessionIdChanging(int value);
  476. partial void OnSessionIdChanged();
  477. partial void OnTimeslotIdChanging(int value);
  478. partial void OnTimeslotIdChanged();
  479. partial void OnRoomIdChanging(int value);
  480. partial void OnRoomIdChanged();
  481. #endregion
  482. public ScheduledSession()
  483. {
  484. this._Room = default(EntityRef<Room>);
  485. this._Timeslot = default(EntityRef<Timeslot>);
  486. this._Session = default(EntityRef<Session>);
  487. OnCreated();
  488. }
  489. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
  490. public int Id
  491. {
  492. get
  493. {
  494. return this._Id;
  495. }
  496. set
  497. {
  498. if ((this._Id != value))
  499. {
  500. this.OnIdChanging(value);
  501. this.SendPropertyChanging();
  502. this._Id = value;
  503. this.SendPropertyChanged("Id");
  504. this.OnIdChanged();
  505. }
  506. }
  507. }
  508. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SessionId", DbType="Int NOT NULL")]
  509. public int SessionId
  510. {
  511. get
  512. {
  513. return this._SessionId;
  514. }
  515. set
  516. {
  517. if ((this._SessionId != value))
  518. {
  519. if (this._Session.HasLoadedOrAssignedValue)
  520. {
  521. throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
  522. }
  523. this.OnSessionIdChanging(value);
  524. this.SendPropertyChanging();
  525. this._SessionId = value;
  526. this.SendPropertyChanged("SessionId");
  527. this.OnSessionIdChanged();
  528. }
  529. }
  530. }
  531. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TimeslotId", DbType="Int NOT NULL")]
  532. public int TimeslotId
  533. {
  534. get
  535. {
  536. return this._TimeslotId;
  537. }
  538. set
  539. {
  540. if ((this._TimeslotId != value))
  541. {
  542. if (this._Timeslot.HasLoadedOrAssignedValue)
  543. {
  544. throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
  545. }
  546. this.OnTimeslotIdChanging(value);
  547. this.SendPropertyChanging();
  548. this._TimeslotId = value;
  549. this.SendPropertyChanged("TimeslotId");
  550. this.OnTimeslotIdChanged();
  551. }
  552. }
  553. }
  554. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoomId", DbType="Int NOT NULL")]
  555. public int RoomId
  556. {
  557. get
  558. {
  559. return this._RoomId;
  560. }
  561. set
  562. {
  563. if ((this._RoomId != value))
  564. {
  565. if (this._Room.HasLoadedOrAssignedValue)
  566. {
  567. throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
  568. }
  569. this.OnRoomIdChanging(value);
  570. this.SendPropertyChanging();
  571. this._RoomId = value;
  572. this.SendPropertyChanged("RoomId");
  573. this.OnRoomIdChanged();
  574. }
  575. }
  576. }
  577. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Room_ScheduledSession", Storage="_Room", ThisKey="RoomId", OtherKey="Id", IsForeignKey=true)]
  578. public Room Room
  579. {
  580. get
  581. {
  582. return this._Room.Entity;
  583. }
  584. set
  585. {
  586. Room previousValue = this._Room.Entity;
  587. if (((previousValue != value)
  588. || (this._Room.HasLoadedOrAssignedValue == false)))
  589. {
  590. this.SendPropertyChanging();
  591. if ((previousValue != null))
  592. {
  593. this._Room.Entity = null;
  594. previousValue.ScheduledSessions.Remove(this);
  595. }
  596. this._Room.Entity = value;
  597. if ((value != null))
  598. {
  599. value.ScheduledSessions.Add(this);
  600. this._RoomId = value.Id;
  601. }
  602. else
  603. {
  604. this._RoomId = default(int);
  605. }
  606. this.SendPropertyChanged("Room");
  607. }
  608. }
  609. }
  610. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Timeslot_ScheduledSession", Storage="_Timeslot", ThisKey="TimeslotId", OtherKey="Id", IsForeignKey=true)]
  611. public Timeslot Timeslot
  612. {
  613. get
  614. {
  615. return this._Timeslot.Entity;
  616. }
  617. set
  618. {
  619. Timeslot previousValue = this._Timeslot.Entity;
  620. if (((previousValue != value)
  621. || (this._Timeslot.HasLoadedOrAssignedValue == false)))
  622. {
  623. this.SendPropertyChanging();
  624. if ((previousValue != null))
  625. {
  626. this._Timeslot.Entity = null;
  627. previousValue.ScheduledSessions.Remove(this);
  628. }
  629. this._Timeslot.Entity = value;
  630. if ((value != null))
  631. {
  632. value.ScheduledSessions.Add(this);
  633. this._TimeslotId = value.Id;
  634. }
  635. else
  636. {
  637. this._TimeslotId = default(int);
  638. }
  639. this.SendPropertyChanged("Timeslot");
  640. }
  641. }
  642. }
  643. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Session_ScheduledSession", Storage="_Session", ThisKey="SessionId", OtherKey="Id", IsForeignKey=true)]
  644. public Session Session
  645. {
  646. get
  647. {
  648. return this._Session.Entity;
  649. }
  650. set
  651. {
  652. Session previousValue = this._Session.Entity;
  653. if (((previousValue != value)
  654. || (this._Session.HasLoadedOrAssignedValue == false)))
  655. {
  656. this.SendPropertyChanging();
  657. if ((previousValue != null))
  658. {
  659. this._Session.Entity = null;
  660. previousValue.ScheduledSessions.Remove(this);
  661. }
  662. this._Session.Entity = value;
  663. if ((value != null))
  664. {
  665. value.ScheduledSessions.Add(this);
  666. this._SessionId = value.Id;
  667. }
  668. else
  669. {
  670. this._SessionId = default(int);
  671. }
  672. this.SendPropertyChanged("Session");
  673. }
  674. }
  675. }
  676. public event PropertyChangingEventHandler PropertyChanging;
  677. public event PropertyChangedEventHandler PropertyChanged;
  678. protected virtual void SendPropertyChanging()
  679. {
  680. if ((this.PropertyChanging != null))
  681. {
  682. this.PropertyChanging(this, emptyChangingEventArgs);
  683. }
  684. }
  685. protected virtual void SendPropertyChanged(String propertyName)
  686. {
  687. if ((this.PropertyChanged != null))
  688. {
  689. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  690. }
  691. }
  692. }
  693. [global::System.Data.Linq.Mapping.TableAttribute(Name="CodeCamp02_Schedule.Timeslots")]
  694. public partial class Timeslot : INotifyPropertyChanging, INotifyPropertyChanged
  695. {
  696. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  697. private int _Id;
  698. private int _EventId;
  699. private string _Name;
  700. private System.DateTime _Date;
  701. private System.TimeSpan _StartTime;
  702. private System.TimeSpan _EndTime;
  703. private EntitySet<ScheduledSession> _ScheduledSessions;
  704. private EntityRef<Event> _Event;
  705. #region Extensibility Method Definitions
  706. partial void OnLoaded();
  707. partial void OnValidate(System.Data.Linq.ChangeAction action);
  708. partial void OnCreated();
  709. partial void OnIdChanging(int value);
  710. partial void OnIdChanged();
  711. partial void OnEventIdChanging(int value);
  712. partial void OnEventIdChanged();
  713. partial void OnNameChanging(string value);
  714. partial void OnNameChanged();
  715. partial void OnDateChanging(System.DateTime value);
  716. partial void OnDateChanged();
  717. partial void OnStartTimeChanging(System.TimeSpan value);
  718. partial void OnStartTimeChanged();
  719. partial void OnEndTimeChanging(System.TimeSpan value);
  720. partial void OnEndTimeChanged();
  721. #endregion
  722. public Timeslot()
  723. {
  724. this._ScheduledSessions = new EntitySet<ScheduledSession>(new Action<ScheduledSession>(this.attach_ScheduledSessions), new Action<ScheduledSession>(this.detach_ScheduledSessions));
  725. this._Event = default(EntityRef<Event>);
  726. OnCreated();
  727. }
  728. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
  729. public int Id
  730. {
  731. get
  732. {
  733. return this._Id;
  734. }
  735. set
  736. {
  737. if ((this._Id != value))
  738. {
  739. this.OnIdChanging(value);
  740. this.SendPropertyChanging();
  741. this._Id = value;
  742. this.SendPropertyChanged("Id");
  743. this.OnIdChanged();
  744. }
  745. }
  746. }
  747. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EventId", DbType="Int NOT NULL")]
  748. public int EventId
  749. {
  750. get
  751. {
  752. return this._EventId;
  753. }
  754. set
  755. {
  756. if ((this._EventId != value))
  757. {
  758. if (this._Event.HasLoadedOrAssignedValue)
  759. {
  760. throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
  761. }
  762. this.OnEventIdChanging(value);
  763. this.SendPropertyChanging();
  764. this._EventId = value;
  765. this.SendPropertyChanged("EventId");
  766. this.OnEventIdChanged();
  767. }
  768. }
  769. }
  770. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(128) NOT NULL", CanBeNull=false)]
  771. public string Name
  772. {
  773. get
  774. {
  775. return this._Name;
  776. }
  777. set
  778. {
  779. if ((this._Name != value))
  780. {
  781. this.OnNameChanging(value);
  782. this.SendPropertyChanging();
  783. this._Name = value;
  784. this.SendPropertyChanged("Name");
  785. this.OnNameChanged();
  786. }
  787. }
  788. }
  789. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Date", DbType="Date NOT NULL")]
  790. public System.DateTime Date
  791. {
  792. get
  793. {
  794. return this._Date;
  795. }
  796. set
  797. {
  798. if ((this._Date != value))
  799. {
  800. this.OnDateChanging(value);
  801. this.SendPropertyChanging();
  802. this._Date = value;
  803. this.SendPropertyChanged("Date");
  804. this.OnDateChanged();
  805. }
  806. }
  807. }
  808. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartTime", DbType="Time NOT NULL")]
  809. public System.TimeSpan StartTime
  810. {
  811. get
  812. {
  813. return this._StartTime;
  814. }
  815. set
  816. {
  817. if ((this._StartTime != value))
  818. {
  819. this.OnStartTimeChanging(value);
  820. this.SendPropertyChanging();
  821. this._StartTime = value;
  822. this.SendPropertyChanged("StartTime");
  823. this.OnStartTimeChanged();
  824. }
  825. }
  826. }
  827. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndTime", DbType="Time NOT NULL")]
  828. public System.TimeSpan EndTime
  829. {
  830. get
  831. {
  832. return this._EndTime;
  833. }
  834. set
  835. {
  836. if ((this._EndTime != value))
  837. {
  838. this.OnEndTimeChanging(value);
  839. this.SendPropertyChanging();
  840. this._EndTime = value;
  841. this.SendPropertyChanged("EndTime");
  842. this.OnEndTimeChanged();
  843. }
  844. }
  845. }
  846. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Timeslot_ScheduledSession", Storage="_ScheduledSessions", ThisKey="Id", OtherKey="TimeslotId")]
  847. public EntitySet<ScheduledSession> ScheduledSessions
  848. {
  849. get
  850. {
  851. return this._ScheduledSessions;
  852. }
  853. set
  854. {
  855. this._ScheduledSessions.Assign(value);
  856. }
  857. }
  858. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Event_Timeslot", Storage="_Event", ThisKey="EventId", OtherKey="Id", IsForeignKey=true)]
  859. public Event Event
  860. {
  861. get
  862. {
  863. return this._Event.Entity;
  864. }
  865. set
  866. {
  867. Event previousValue = this._Event.Entity;
  868. if (((previousValue != value)
  869. || (this._Event.HasLoadedOrAssignedValue == false)))
  870. {
  871. this.SendPropertyChanging();
  872. if ((previousValue != null))
  873. {
  874. this._Event.Entity = null;
  875. previousValue.Timeslots.Remove(this);
  876. }
  877. this._Event.Entity = value;
  878. if ((value != null))
  879. {
  880. value.Timeslots.Add(this);
  881. this._EventId = value.Id;
  882. }
  883. else
  884. {
  885. this._EventId = default(int);
  886. }
  887. this.SendPropertyChanged("Event");
  888. }
  889. }
  890. }
  891. public event PropertyChangingEventHandler PropertyChanging;
  892. public event PropertyChangedEventHandler PropertyChanged;
  893. protected virtual void SendPropertyChanging()
  894. {
  895. if ((this.PropertyChanging != null))
  896. {
  897. this.PropertyChanging(this, emptyChangingEventArgs);
  898. }
  899. }
  900. protected virtual void SendPropertyChanged(String propertyName)
  901. {
  902. if ((this.PropertyChanged != null))
  903. {
  904. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  905. }
  906. }
  907. private void attach_ScheduledSessions(ScheduledSession entity)
  908. {
  909. this.SendPropertyChanging();
  910. entity.Timeslot = this;
  911. }
  912. private void detach_ScheduledSessions(ScheduledSession entity)
  913. {
  914. this.SendPropertyChanging();
  915. entity.Timeslot = null;
  916. }
  917. }
  918. [global::System.Data.Linq.Mapping.TableAttribute(Name="[CodeCamp01.Events].Events")]
  919. public partial class Event : INotifyPropertyChanging, INotifyPropertyChanged
  920. {
  921. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  922. private int _Id;
  923. private string _DisplayName;
  924. private string _ShortName;
  925. private EntitySet<Building> _Buildings;
  926. private EntitySet<Timeslot> _Timeslots;
  927. private EntitySet<Session> _Sessions;
  928. private EntitySet<Presenter> _Presenters;
  929. #region Extensibility Method Definitions
  930. partial void OnLoaded();
  931. partial void OnValidate(System.Data.Linq.ChangeAction action);
  932. partial void OnCreated();
  933. partial void OnIdChanging(int value);
  934. partial void OnIdChanged();
  935. partial void OnDisplayNameChanging(string value);
  936. partial void OnDisplayNameChanged();
  937. partial void OnShortNameChanging(string value);
  938. partial void OnShortNameChanged();
  939. #endregion
  940. public Event()
  941. {
  942. this._Buildings = new EntitySet<Building>(new Action<Building>(this.attach_Buildings), new Action<Building>(this.detach_Buildings));
  943. this._Timeslots = new EntitySet<Timeslot>(new Action<Timeslot>(this.attach_Timeslots), new Action<Timeslot>(this.detach_Timeslots));
  944. this._Sessions = new EntitySet<Session>(new Action<Session>(this.attach_Sessions), new Action<Session>(this.detach_Sessions));
  945. this._Presenters = new EntitySet<Presenter>(new Action<Presenter>(this.attach_Presenters), new Action<Presenter>(this.detach_Presenters));
  946. OnCreated();
  947. }
  948. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
  949. public int Id
  950. {
  951. get
  952. {
  953. return this._Id;
  954. }
  955. set
  956. {
  957. if ((this._Id != value))
  958. {
  959. this.OnIdChanging(value);
  960. this.SendPropertyChanging();
  961. this._Id = value;
  962. this.SendPropertyChanged("Id");
  963. this.OnIdChanged();
  964. }
  965. }
  966. }
  967. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DisplayName", DbType="NVarChar(128) NOT NULL", CanBeNull=false)]
  968. public string DisplayName
  969. {
  970. get
  971. {
  972. return this._DisplayName;
  973. }
  974. set
  975. {
  976. if ((this._DisplayName != value))
  977. {
  978. this.OnDisplayNameChanging(value);
  979. this.SendPropertyChanging();
  980. this._DisplayName = value;
  981. this.SendPropertyChanged("DisplayName");
  982. this.OnDisplayNameChanged();
  983. }
  984. }
  985. }
  986. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShortName", DbType="NVarChar(32) NOT NULL", CanBeNull=false)]
  987. public string ShortName
  988. {
  989. get
  990. {
  991. return this._ShortName;
  992. }
  993. set
  994. {
  995. if ((this._ShortName != value))
  996. {
  997. this.OnShortNameChanging(value);
  998. this.SendPropertyChanging();
  999. this._ShortName = value;
  1000. this.SendPropertyChanged("ShortName");
  1001. this.OnShortNameChanged();
  1002. }
  1003. }
  1004. }
  1005. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Event_Building", Storage="_Buildings", ThisKey="Id", OtherKey="EventId")]
  1006. public EntitySet<Building> Buildings
  1007. {
  1008. get
  1009. {
  1010. return this._Buildings;
  1011. }
  1012. set
  1013. {
  1014. this._Buildings.Assign(value);
  1015. }
  1016. }
  1017. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Event_Timeslot", Storage="_Timeslots", ThisKey="Id", OtherKey="EventId")]
  1018. public EntitySet<Timeslot> Timeslots
  1019. {
  1020. get
  1021. {
  1022. return this._Timeslots;
  1023. }
  1024. set
  1025. {
  1026. this._Timeslots.Assign(value);
  1027. }
  1028. }
  1029. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Event_Session", Storage="_Sessions", ThisKey="Id", OtherKey="EventId")]
  1030. public EntitySet<Session> Sessions
  1031. {
  1032. get
  1033. {
  1034. return this._Sessions;
  1035. }
  1036. set
  1037. {
  1038. this._Sessions.Assign(value);
  1039. }
  1040. }
  1041. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Event_Presenter", Storage="_Presenters", ThisKey="Id", OtherKey="EventId")]
  1042. public EntitySet<Presenter> Presenters
  1043. {
  1044. get
  1045. {
  1046. return this._Presenters;
  1047. }
  1048. set
  1049. {
  1050. this._Presenters.Assign(value);
  1051. }
  1052. }
  1053. public event PropertyChangingEventHandler PropertyChanging;
  1054. public event PropertyChangedEventHandler PropertyChanged;
  1055. protected virtual void SendPropertyChanging()
  1056. {
  1057. if ((this.PropertyChanging != null))
  1058. {
  1059. this.PropertyChanging(this, emptyChangingEventArgs);
  1060. }
  1061. }
  1062. protected virtual void SendPropertyChanged(String propertyName)
  1063. {
  1064. if ((this.PropertyChanged != null))
  1065. {
  1066. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  1067. }
  1068. }
  1069. private void attach_Buildings(Building entity)
  1070. {
  1071. this.SendPropertyChanging();
  1072. entity.Event = this;
  1073. }
  1074. private void detach_Buildings(Building entity)
  1075. {
  1076. this.SendPropertyChanging();
  1077. entity.Event = null;
  1078. }
  1079. private void attach_Timeslots(Timeslot entity)
  1080. {
  1081. this.SendPropertyChanging();
  1082. entity.Event = this;
  1083. }
  1084. private void detach_Timeslots(Timeslot entity)
  1085. {
  1086. this.SendPropertyChanging();
  1087. entity.Event = null;
  1088. }
  1089. private void attach_Sessions(Session entity)
  1090. {
  1091. this.SendPropertyChanging();
  1092. entity.Event = this;
  1093. }
  1094. private void detach_Sessions(Session entity)
  1095. {
  1096. this.SendPropertyChanging();
  1097. entity.Event = null;
  1098. }
  1099. private void attach_Presenters(Presenter entity)
  1100. {
  1101. this.SendPropertyChanging();
  1102. entity.Event = this;
  1103. }
  1104. private void detach_Presenters(Presenter entity)
  1105. {
  1106. this.SendPropertyChanging();
  1107. entity.Event = null;
  1108. }
  1109. }
  1110. [global::System.Data.Linq.Mapping.TableAttribute(Name="[CodeCamp01.Contents].Sessions")]
  1111. public partial class Session : INotifyPropertyChanging, INotifyPropertyChanged
  1112. {
  1113. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  1114. private int _Id;
  1115. private int _EventId;
  1116. private string _Title;
  1117. private string _Description;
  1118. private string _SessionMaterialsUrl;
  1119. private EntitySet<ScheduledSession> _ScheduledSessions;
  1120. private EntitySet<SessionPresenter> _SessionPresenters;
  1121. private EntityRef<Event> _Event;
  1122. #region Extensibility Method Definitions
  1123. partial void OnLoaded();
  1124. partial void OnValidate(System.Data.Linq.ChangeAction action);
  1125. partial void OnCreated();
  1126. partial void OnIdChanging(int value);
  1127. partial void OnIdChanged();
  1128. partial void OnEventIdChanging(int value);
  1129. partial void OnEventIdChanged();
  1130. partial void OnTitleChanging(string value);
  1131. partial void OnTitleChanged();
  1132. partial void OnDescriptionChanging(string value);
  1133. partial void OnDescriptionChanged();
  1134. partial void OnSessionMaterialsUrlChanging(string value);
  1135. partial void OnSessionMaterialsUrlChanged();
  1136. #endregion
  1137. public Session()
  1138. {
  1139. this._ScheduledSessions = new EntitySet<ScheduledSession>(new Action<ScheduledSession>(this.attach_ScheduledSessions), new Action<ScheduledSession>(this.detach_ScheduledSessions));
  1140. this._SessionPresenters = new EntitySet<SessionPresenter>(new Action<SessionPresenter>(this.attach_SessionPresenters), new Action<SessionPresenter>(this.detach_SessionPresenters));
  1141. this._Event = default(EntityRef<Event>);
  1142. OnCreated();
  1143. }
  1144. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
  1145. public int Id
  1146. {
  1147. get
  1148. {
  1149. return this._Id;
  1150. }
  1151. set
  1152. {
  1153. if ((this._Id != value))
  1154. {
  1155. this.OnIdChanging(value);
  1156. this.SendPropertyChanging();
  1157. this._Id = value;
  1158. this.SendPropertyChanged("Id");
  1159. this.OnIdChanged();
  1160. }
  1161. }
  1162. }
  1163. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EventId", DbType="Int NOT NULL")]
  1164. public int EventId
  1165. {
  1166. get
  1167. {
  1168. return this._EventId;
  1169. }
  1170. set
  1171. {
  1172. if ((this._EventId != value))
  1173. {
  1174. if (this._Event.HasLoadedOrAssignedValue)
  1175. {
  1176. throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
  1177. }
  1178. this.OnEventIdChanging(value);
  1179. this.SendPropertyChanging();
  1180. this._EventId = value;
  1181. this.SendPropertyChanged("EventId");
  1182. this.OnEventIdChanged();
  1183. }
  1184. }
  1185. }
  1186. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Title", DbType="NVarChar(128) NOT NULL", CanBeNull=false)]
  1187. public string Title
  1188. {
  1189. get
  1190. {
  1191. return this._Title;
  1192. }
  1193. set
  1194. {
  1195. if ((this._Title != value))
  1196. {
  1197. this.OnTitleChanging(value);
  1198. this.SendPropertyChanging();
  1199. this._Title = value;
  1200. this.SendPropertyChanged("Title");
  1201. this.OnTitleChanged();
  1202. }
  1203. }
  1204. }
  1205. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(4000) NOT NULL", CanBeNull=false)]
  1206. public string Description
  1207. {
  1208. get
  1209. {
  1210. return this._Description;
  1211. }
  1212. set
  1213. {
  1214. if ((this._Description != value))
  1215. {
  1216. this.OnDescriptionChanging(value);
  1217. this.SendPropertyChanging();
  1218. this._Description = value;
  1219. this.SendPropertyChanged("Description");
  1220. this.OnDescriptionChanged();
  1221. }
  1222. }
  1223. }
  1224. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SessionMaterialsUrl", DbType="NVarChar(128)")]
  1225. public string SessionMaterialsUrl
  1226. {
  1227. get
  1228. {
  1229. return this._SessionMaterialsUrl;
  1230. }
  1231. set
  1232. {
  1233. if ((this._SessionMaterialsUrl != value))
  1234. {
  1235. this.OnSessionMaterialsUrlChanging(value);
  1236. this.SendPropertyChanging();
  1237. this._SessionMaterialsUrl = value;
  1238. this.SendPropertyChanged("SessionMaterialsUrl");
  1239. this.OnSessionMaterialsUrlChanged();
  1240. }
  1241. }
  1242. }
  1243. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Session_ScheduledSession", Storage="_ScheduledSessions", ThisKey="Id", OtherKey="SessionId")]
  1244. public EntitySet<ScheduledSession> ScheduledSessions
  1245. {
  1246. get
  1247. {
  1248. return this._ScheduledSessions;
  1249. }
  1250. set
  1251. {
  1252. this._ScheduledSessions.Assign(value);
  1253. }
  1254. }
  1255. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Session_SessionPresenter", Storage="_SessionPresenters", ThisKey="Id", OtherKey="SessionId")]
  1256. public EntitySet<SessionPresenter> SessionPresenters
  1257. {
  1258. get
  1259. {
  1260. return this._SessionPresenters;
  1261. }
  1262. set
  1263. {
  1264. this._SessionPresenters.Assign(value);
  1265. }
  1266. }
  1267. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Event_Session", Storage="_Event", ThisKey="EventId", OtherKey="Id", IsForeignKey=true)]
  1268. public Event Event
  1269. {
  1270. get
  1271. {
  1272. return this._Event.Entity;
  1273. }
  1274. set
  1275. {
  1276. Event previousValue = this._Event.Entity;
  1277. if (((previousValue != value)
  1278. || (this._Event.HasLoadedOrAssignedValue == false)))
  1279. {
  1280. this.SendPropertyChanging();
  1281. if ((previousValue != null))
  1282. {
  1283. this._Event.Entity = null;
  1284. previousValue.Sessions.Remove(this);
  1285. }
  1286. this._Event.Entity = value;
  1287. if ((value != null))
  1288. {
  1289. value.Sessions.Add(this);
  1290. this._EventId = value.Id;
  1291. }
  1292. else
  1293. {
  1294. this._EventId = default(int);
  1295. }
  1296. this.SendPropertyChanged("Event");
  1297. }
  1298. }
  1299. }
  1300. public event PropertyChangingEventHandler PropertyChanging;
  1301. public event PropertyChangedEventHandler PropertyChanged;
  1302. protected virtual void SendPropertyChanging()
  1303. {
  1304. if ((this.PropertyChanging != null))
  1305. {
  1306. this.PropertyChanging(this, emptyChangingEventArgs);
  1307. }
  1308. }
  1309. protected virtual void SendPropertyChanged(String propertyName)
  1310. {
  1311. if ((this.PropertyChanged != null))
  1312. {
  1313. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  1314. }
  1315. }
  1316. private void attach_ScheduledSessions(ScheduledSession entity)
  1317. {
  1318. this.SendPropertyChanging();
  1319. entity.Session = this;
  1320. }
  1321. private void detach_ScheduledSessions(ScheduledSession entity)
  1322. {
  1323. this.SendPropertyChanging();
  1324. entity.Session = null;
  1325. }
  1326. private void attach_SessionPresenters(SessionPresenter entity)
  1327. {
  1328. this.SendPropertyChanging();
  1329. entity.Session = this;
  1330. }
  1331. private void detach_SessionPresenters(SessionPresenter entity)
  1332. {
  1333. this.SendPropertyChanging();
  1334. entity.Session = null;
  1335. }
  1336. }
  1337. [global::System.Data.Linq.Mapping.TableAttribute(Name="[CodeCamp01.Contents].SessionPresenters")]
  1338. public partial class SessionPresenter : INotifyPropertyChanging, INotifyPropertyChanged
  1339. {
  1340. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  1341. private int _Id;
  1342. private int _SessionId;
  1343. private int _PresenterId;
  1344. private EntityRef<Session> _Session;
  1345. private EntityRef<Presenter> _Presenter;
  1346. #region Extensibility Method Definitions
  1347. partial void OnLoaded();
  1348. partial void OnValidate(System.Data.Linq.ChangeAction action);
  1349. partial void OnCreated();
  1350. partial void OnIdChanging(int value);
  1351. partial void OnIdChanged();
  1352. partial void OnSessionIdChanging(int value);
  1353. partial void OnSessionIdChanged();
  1354. partial void OnPresenterIdChanging(int value);
  1355. partial void OnPresenterIdChanged();
  1356. #endregion
  1357. public SessionPresenter()
  1358. {
  1359. this._Session = default(EntityRef<Session>);
  1360. this._Presenter = default(EntityRef<Presenter>);
  1361. OnCreated();
  1362. }
  1363. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
  1364. public int Id
  1365. {
  1366. get
  1367. {
  1368. return this._Id;
  1369. }
  1370. set
  1371. {
  1372. if ((this._Id != value))
  1373. {
  1374. this.OnIdChanging(value);
  1375. this.SendPropertyChanging();
  1376. this._Id = value;
  1377. this.SendPropertyChanged("Id");
  1378. this.OnIdChanged();
  1379. }
  1380. }
  1381. }
  1382. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SessionId", DbType="Int NOT NULL")]
  1383. public int SessionId
  1384. {
  1385. get
  1386. {
  1387. return this._SessionId;
  1388. }
  1389. set
  1390. {
  1391. if ((this._SessionId != value))
  1392. {
  1393. if (this._Session.HasLoadedOrAssignedValue)
  1394. {
  1395. throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
  1396. }
  1397. this.OnSessionIdChanging(value);
  1398. this.SendPropertyChanging();
  1399. this._SessionId = value;
  1400. this.SendPropertyChanged("SessionId");
  1401. this.OnSessionIdChanged();
  1402. }
  1403. }
  1404. }
  1405. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PresenterId", DbType="Int NOT NULL")]
  1406. public int PresenterId
  1407. {
  1408. get
  1409. {
  1410. return this._PresenterId;
  1411. }
  1412. set
  1413. {
  1414. if ((this._PresenterId != value))
  1415. {
  1416. if (this._Presenter.HasLoadedOrAssignedValue)
  1417. {
  1418. throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
  1419. }
  1420. this.OnPresenterIdChanging(value);
  1421. this.SendPropertyChanging();
  1422. this._PresenterId = value;
  1423. this.SendPropertyChanged("PresenterId");
  1424. this.OnPresenterIdChanged();
  1425. }
  1426. }
  1427. }
  1428. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Session_SessionPresenter", Storage="_Session", ThisKey="SessionId", OtherKey="Id", IsForeignKey=true)]
  1429. public Session Session
  1430. {
  1431. get
  1432. {
  1433. return this._Session.Entity;
  1434. }
  1435. set
  1436. {
  1437. Session previousValue = this._Session.Entity;
  1438. if (((previousValue != value)
  1439. || (this._Session.HasLoadedOrAssignedValue == false)))
  1440. {
  1441. this.SendPropertyChanging();
  1442. if ((previousValue != null))
  1443. {
  1444. this._Session.Entity = null;
  1445. previousValue.SessionPresenters.Remove(this);
  1446. }
  1447. this._Session.Entity = value;
  1448. if ((value != null))
  1449. {
  1450. value.SessionPresenters.Add(this);
  1451. this._SessionId = value.Id;
  1452. }
  1453. else
  1454. {
  1455. this._SessionId = default(int);
  1456. }
  1457. this.SendPropertyChanged("Session");
  1458. }
  1459. }
  1460. }
  1461. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Presenter_SessionPresenter", Storage="_Presenter", ThisKey="PresenterId", OtherKey="Id", IsForeignKey=true)]
  1462. public Presenter Presenter
  1463. {
  1464. get
  1465. {
  1466. return this._Presenter.Entity;
  1467. }
  1468. set
  1469. {
  1470. Presenter previousValue = this._Presenter.Entity;
  1471. if (((previousValue != value)
  1472. || (this._Presenter.HasLoadedOrAssignedValue == false)))
  1473. {
  1474. this.SendPropertyChanging();
  1475. if ((previousValue != null))
  1476. {
  1477. this._Presenter.Entity = null;
  1478. previousValue.SessionPresenters.Remove(this);
  1479. }
  1480. this._Presenter.Entity = value;
  1481. if ((value != null))
  1482. {
  1483. value.SessionPresenters.Add(this);
  1484. this._PresenterId = value.Id;
  1485. }
  1486. else
  1487. {
  1488. this._PresenterId = default(int);
  1489. }
  1490. this.SendPropertyChanged("Presenter");
  1491. }
  1492. }
  1493. }
  1494. public event PropertyChangingEventHandler PropertyChanging;
  1495. public event PropertyChangedEventHandler PropertyChanged;
  1496. protected virtual void SendPropertyChanging()
  1497. {
  1498. if ((this.PropertyChanging != null))
  1499. {
  1500. this.PropertyChanging(this, emptyChangingEventArgs);
  1501. }
  1502. }
  1503. protected virtual void SendPropertyChanged(String propertyName)
  1504. {
  1505. if ((this.PropertyChanged != null))
  1506. {
  1507. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  1508. }
  1509. }
  1510. }
  1511. [global::System.Data.Linq.Mapping.TableAttribute(Name="[CodeCamp01.Contents].Presenters")]
  1512. public partial class Presenter : INotifyPropertyChanging, INotifyPropertyChanged
  1513. {
  1514. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  1515. private int _Id;
  1516. private int _EventId;
  1517. private string _UserIdentityName;
  1518. private string _FirstName;
  1519. private string _LastName;
  1520. private string _TwitterName;
  1521. private string _EmailAddress;
  1522. private string _WebsiteUrl;
  1523. private string _BlogUrl;
  1524. private string _Biography;
  1525. private string _ShirtSize;
  1526. private EntitySet<SessionPresenter> _SessionPresenters;
  1527. private EntityRef<Event> _Event;
  1528. #region Extensibility Method Definitions
  1529. partial void OnLoaded();
  1530. partial void OnValidate(System.Data.Linq.ChangeAction action);
  1531. partial void OnCreated();
  1532. partial void OnIdChanging(int value);
  1533. partial void OnIdChanged();
  1534. partial void OnEventIdChanging(int value);
  1535. partial void OnEventIdChanged();
  1536. partial void OnUserIdentityNameChanging(string value);
  1537. partial void OnUserIdentityNameChanged();
  1538. partial void OnFirstNameChanging(string value);
  1539. partial void OnFirstNameChanged();
  1540. partial void OnLastNameChanging(string value);
  1541. partial void OnLastNameChanged();
  1542. partial void OnTwitterNameChanging(string value);
  1543. partial void OnTwitterNameChanged();
  1544. partial void OnEmailAddressChanging(string value);
  1545. partial void OnEmailAddressChanged();
  1546. partial void OnWebsiteUrlChanging(string value);
  1547. partial void OnWebsiteUrlChanged();
  1548. partial void OnBlogUrlChanging(string value);
  1549. partial void OnBlogUrlChanged();
  1550. partial void OnBiographyChanging(string value);
  1551. partial void OnBiographyChanged();
  1552. partial void OnShirtSizeChanging(string value);
  1553. partial void OnShirtSizeChanged();
  1554. #endregion
  1555. public Presenter()
  1556. {
  1557. this._SessionPresenters = new EntitySet<SessionPresenter>(new Action<SessionPresenter>(this.attach_SessionPresenters), new Action<SessionPresenter>(this.detach_SessionPresenters));
  1558. this._Event = default(EntityRef<Event>);
  1559. OnCreated();
  1560. }
  1561. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
  1562. public int Id
  1563. {
  1564. get
  1565. {
  1566. return this._Id;
  1567. }
  1568. set
  1569. {
  1570. if ((this._Id != value))
  1571. {
  1572. this.OnIdChanging(value);
  1573. this.SendPropertyChanging();
  1574. this._Id = value;
  1575. this.SendPropertyChanged("Id");
  1576. this.OnIdChanged();
  1577. }
  1578. }
  1579. }
  1580. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EventId", DbType="Int NOT NULL")]
  1581. public int EventId
  1582. {
  1583. get
  1584. {
  1585. return this._EventId;
  1586. }
  1587. set
  1588. {
  1589. if ((this._EventId != value))
  1590. {
  1591. if (this._Event.HasLoadedOrAssignedValue)
  1592. {
  1593. throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
  1594. }
  1595. this.OnEventIdChanging(value);
  1596. this.SendPropertyChanging();
  1597. this._EventId = value;
  1598. this.SendPropertyChanged("EventId");
  1599. this.OnEventIdChanged();
  1600. }
  1601. }
  1602. }
  1603. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserIdentityName", DbType="NVarChar(128) NOT NULL", CanBeNull=false)]
  1604. public string UserIdentityName
  1605. {
  1606. get
  1607. {
  1608. return this._UserIdentityName;
  1609. }
  1610. set
  1611. {
  1612. if ((this._UserIdentityName != value))
  1613. {
  1614. this.OnUserIdentityNameChanging(value);
  1615. this.SendPropertyChanging();
  1616. this._UserIdentityName = value;
  1617. this.SendPropertyChanged("UserIdentityName");
  1618. this.OnUserIdentityNameChanged();
  1619. }
  1620. }
  1621. }
  1622. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FirstName", DbType="NVarChar(128) NOT NULL", CanBeNull=false)]
  1623. public string FirstName
  1624. {
  1625. get
  1626. {
  1627. return this._FirstName;
  1628. }
  1629. set
  1630. {
  1631. if ((this._FirstName != value))
  1632. {
  1633. this.OnFirstNameChanging(value);
  1634. this.SendPropertyChanging();
  1635. this._FirstName = value;
  1636. this.SendPropertyChanged("FirstName");
  1637. this.OnFirstNameChanged();
  1638. }
  1639. }
  1640. }
  1641. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastName", DbType="NVarChar(128) NOT NULL", CanBeNull=false)]
  1642. public string LastName
  1643. {
  1644. get
  1645. {
  1646. return this._LastName;
  1647. }
  1648. set
  1649. {
  1650. if ((this._LastName != value))
  1651. {
  1652. this.OnLastNameChanging(value);
  1653. this.SendPropertyChanging();
  1654. this._LastName = value;
  1655. this.SendPropertyChanged("LastName");
  1656. this.OnLastNameChanged();
  1657. }
  1658. }
  1659. }
  1660. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TwitterName", DbType="NVarChar(128)")]
  1661. public string TwitterName
  1662. {
  1663. get
  1664. {
  1665. return this._TwitterName;
  1666. }
  1667. set
  1668. {
  1669. if ((this._TwitterName !=

Large files files are truncated, but you can click here to view the full file