PageRenderTime 48ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/ScheduleView/Database/SL_CS/WithDB/Generated_Code/ScheduleViewDB.Web.g.cs

https://github.com/Kathy-Wu/xaml-sdk
C# | 3156 lines | 2281 code | 299 blank | 576 comment | 250 complexity | 4532f30604062f02f7e2f3bb634e0bd3 MD5 | raw file

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

  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated by a tool.
  4. // Runtime Version:4.0.30319.18052
  5. //
  6. // Changes to this file may cause incorrect behavior and will be lost if
  7. // the code is regenerated.
  8. // </auto-generated>
  9. //------------------------------------------------------------------------------
  10. namespace ScheduleViewDB
  11. {
  12. using System;
  13. using System.Collections.Generic;
  14. using System.ComponentModel;
  15. using System.ComponentModel.DataAnnotations;
  16. using System.Linq;
  17. using System.ServiceModel.DomainServices;
  18. using System.ServiceModel.DomainServices.Client;
  19. using System.ServiceModel.DomainServices.Client.ApplicationServices;
  20. /// <summary>
  21. /// Context for the RIA application.
  22. /// </summary>
  23. /// <remarks>
  24. /// This context extends the base to make application services and types available
  25. /// for consumption from code and xaml.
  26. /// </remarks>
  27. public sealed partial class WebContext : WebContextBase
  28. {
  29. #region Extensibility Method Definitions
  30. /// <summary>
  31. /// This method is invoked from the constructor once initialization is complete and
  32. /// can be used for further object setup.
  33. /// </summary>
  34. partial void OnCreated();
  35. #endregion
  36. /// <summary>
  37. /// Initializes a new instance of the WebContext class.
  38. /// </summary>
  39. public WebContext()
  40. {
  41. this.OnCreated();
  42. }
  43. /// <summary>
  44. /// Gets the context that is registered as a lifetime object with the current application.
  45. /// </summary>
  46. /// <exception cref="InvalidOperationException"> is thrown if there is no current application,
  47. /// no contexts have been added, or more than one context has been added.
  48. /// </exception>
  49. /// <seealso cref="System.Windows.Application.ApplicationLifetimeObjects"/>
  50. public new static WebContext Current
  51. {
  52. get
  53. {
  54. return ((WebContext)(WebContextBase.Current));
  55. }
  56. }
  57. }
  58. }
  59. namespace ScheduleViewDB.Web
  60. {
  61. using System;
  62. using System.Collections.Generic;
  63. using System.ComponentModel;
  64. using System.ComponentModel.DataAnnotations;
  65. using System.ComponentModel.DataAnnotations.Schema;
  66. using System.Linq;
  67. using System.Runtime.Serialization;
  68. using System.ServiceModel;
  69. using System.ServiceModel.DomainServices;
  70. using System.ServiceModel.DomainServices.Client;
  71. using System.ServiceModel.DomainServices.Client.ApplicationServices;
  72. using System.ServiceModel.Web;
  73. using System.Xml.Serialization;
  74. /// <summary>
  75. /// The 'Category' entity class.
  76. /// </summary>
  77. [DataContract(Namespace="http://schemas.datacontract.org/2004/07/ScheduleViewDB.Web")]
  78. public sealed partial class Category : Entity
  79. {
  80. private string _categoryBrushName;
  81. private int _categoryID;
  82. private string _categoryName;
  83. private string _displayName;
  84. private EntityCollection<SqlAppointment> _sqlAppointments;
  85. private EntityCollection<SqlExceptionAppointment> _sqlExceptionAppointments;
  86. #region Extensibility Method Definitions
  87. /// <summary>
  88. /// This method is invoked from the constructor once initialization is complete and
  89. /// can be used for further object setup.
  90. /// </summary>
  91. partial void OnCreated();
  92. partial void OnCategoryBrushNameChanging(string value);
  93. partial void OnCategoryBrushNameChanged();
  94. partial void OnCategoryIDChanging(int value);
  95. partial void OnCategoryIDChanged();
  96. partial void OnCategoryNameChanging(string value);
  97. partial void OnCategoryNameChanged();
  98. partial void OnDisplayNameChanging(string value);
  99. partial void OnDisplayNameChanged();
  100. #endregion
  101. /// <summary>
  102. /// Initializes a new instance of the <see cref="Category"/> class.
  103. /// </summary>
  104. public Category()
  105. {
  106. this.OnCreated();
  107. }
  108. /// <summary>
  109. /// Gets or sets the 'CategoryBrushName' value.
  110. /// </summary>
  111. [DataMember()]
  112. [StringLength(100)]
  113. public string CategoryBrushName
  114. {
  115. get
  116. {
  117. return this._categoryBrushName;
  118. }
  119. set
  120. {
  121. if ((this._categoryBrushName != value))
  122. {
  123. this.OnCategoryBrushNameChanging(value);
  124. this.RaiseDataMemberChanging("CategoryBrushName");
  125. this.ValidateProperty("CategoryBrushName", value);
  126. this._categoryBrushName = value;
  127. this.RaiseDataMemberChanged("CategoryBrushName");
  128. this.OnCategoryBrushNameChanged();
  129. }
  130. }
  131. }
  132. /// <summary>
  133. /// Gets or sets the 'CategoryID' value.
  134. /// </summary>
  135. [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  136. [DataMember()]
  137. [Editable(false, AllowInitialValue=true)]
  138. [Key()]
  139. [RoundtripOriginal()]
  140. public int CategoryID
  141. {
  142. get
  143. {
  144. return this._categoryID;
  145. }
  146. set
  147. {
  148. if ((this._categoryID != value))
  149. {
  150. this.OnCategoryIDChanging(value);
  151. this.ValidateProperty("CategoryID", value);
  152. this._categoryID = value;
  153. this.RaisePropertyChanged("CategoryID");
  154. this.OnCategoryIDChanged();
  155. }
  156. }
  157. }
  158. /// <summary>
  159. /// Gets or sets the 'CategoryName' value.
  160. /// </summary>
  161. [DataMember()]
  162. [StringLength(100)]
  163. public string CategoryName
  164. {
  165. get
  166. {
  167. return this._categoryName;
  168. }
  169. set
  170. {
  171. if ((this._categoryName != value))
  172. {
  173. this.OnCategoryNameChanging(value);
  174. this.RaiseDataMemberChanging("CategoryName");
  175. this.ValidateProperty("CategoryName", value);
  176. this._categoryName = value;
  177. this.RaiseDataMemberChanged("CategoryName");
  178. this.OnCategoryNameChanged();
  179. }
  180. }
  181. }
  182. /// <summary>
  183. /// Gets or sets the 'DisplayName' value.
  184. /// </summary>
  185. [DataMember()]
  186. [StringLength(100)]
  187. public string DisplayName
  188. {
  189. get
  190. {
  191. return this._displayName;
  192. }
  193. set
  194. {
  195. if ((this._displayName != value))
  196. {
  197. this.OnDisplayNameChanging(value);
  198. this.RaiseDataMemberChanging("DisplayName");
  199. this.ValidateProperty("DisplayName", value);
  200. this._displayName = value;
  201. this.RaiseDataMemberChanged("DisplayName");
  202. this.OnDisplayNameChanged();
  203. }
  204. }
  205. }
  206. /// <summary>
  207. /// Gets the collection of associated <see cref="SqlAppointment"/> entity instances.
  208. /// </summary>
  209. [Association("Category_SqlAppointment", "CategoryID", "CategoryID")]
  210. [XmlIgnore()]
  211. public EntityCollection<SqlAppointment> SqlAppointments
  212. {
  213. get
  214. {
  215. if ((this._sqlAppointments == null))
  216. {
  217. this._sqlAppointments = new EntityCollection<SqlAppointment>(this, "SqlAppointments", this.FilterSqlAppointments, this.AttachSqlAppointments, this.DetachSqlAppointments);
  218. }
  219. return this._sqlAppointments;
  220. }
  221. }
  222. /// <summary>
  223. /// Gets the collection of associated <see cref="SqlExceptionAppointment"/> entity instances.
  224. /// </summary>
  225. [Association("Category_SqlExceptionAppointment", "CategoryID", "CategoryID")]
  226. [XmlIgnore()]
  227. public EntityCollection<SqlExceptionAppointment> SqlExceptionAppointments
  228. {
  229. get
  230. {
  231. if ((this._sqlExceptionAppointments == null))
  232. {
  233. this._sqlExceptionAppointments = new EntityCollection<SqlExceptionAppointment>(this, "SqlExceptionAppointments", this.FilterSqlExceptionAppointments, this.AttachSqlExceptionAppointments, this.DetachSqlExceptionAppointments);
  234. }
  235. return this._sqlExceptionAppointments;
  236. }
  237. }
  238. private void AttachSqlAppointments(SqlAppointment entity)
  239. {
  240. entity.Category = this;
  241. }
  242. private void DetachSqlAppointments(SqlAppointment entity)
  243. {
  244. entity.Category = null;
  245. }
  246. private bool FilterSqlAppointments(SqlAppointment entity)
  247. {
  248. return (entity.CategoryID == this.CategoryID);
  249. }
  250. private void AttachSqlExceptionAppointments(SqlExceptionAppointment entity)
  251. {
  252. entity.Category = this;
  253. }
  254. private void DetachSqlExceptionAppointments(SqlExceptionAppointment entity)
  255. {
  256. entity.Category = null;
  257. }
  258. private bool FilterSqlExceptionAppointments(SqlExceptionAppointment entity)
  259. {
  260. return (entity.CategoryID == this.CategoryID);
  261. }
  262. /// <summary>
  263. /// Computes a value from the key fields that uniquely identifies this entity instance.
  264. /// </summary>
  265. /// <returns>An object instance that uniquely identifies this entity instance.</returns>
  266. public override object GetIdentity()
  267. {
  268. return this._categoryID;
  269. }
  270. }
  271. /// <summary>
  272. /// The DomainContext corresponding to the 'ScheduleViewDomainService' DomainService.
  273. /// </summary>
  274. public sealed partial class ScheduleViewDomainContext : DomainContext
  275. {
  276. #region Extensibility Method Definitions
  277. /// <summary>
  278. /// This method is invoked from the constructor once initialization is complete and
  279. /// can be used for further object setup.
  280. /// </summary>
  281. partial void OnCreated();
  282. #endregion
  283. /// <summary>
  284. /// Initializes a new instance of the <see cref="ScheduleViewDomainContext"/> class.
  285. /// </summary>
  286. public ScheduleViewDomainContext() :
  287. this(new WebDomainClient<IScheduleViewDomainServiceContract>(new Uri("ScheduleViewDB-Web-ScheduleViewDomainService.svc", UriKind.Relative)))
  288. {
  289. }
  290. /// <summary>
  291. /// Initializes a new instance of the <see cref="ScheduleViewDomainContext"/> class with the specified service URI.
  292. /// </summary>
  293. /// <param name="serviceUri">The ScheduleViewDomainService service URI.</param>
  294. public ScheduleViewDomainContext(Uri serviceUri) :
  295. this(new WebDomainClient<IScheduleViewDomainServiceContract>(serviceUri))
  296. {
  297. }
  298. /// <summary>
  299. /// Initializes a new instance of the <see cref="ScheduleViewDomainContext"/> class with the specified <paramref name="domainClient"/>.
  300. /// </summary>
  301. /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
  302. public ScheduleViewDomainContext(DomainClient domainClient) :
  303. base(domainClient)
  304. {
  305. this.OnCreated();
  306. }
  307. /// <summary>
  308. /// Gets the set of <see cref="Category"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  309. /// </summary>
  310. public EntitySet<Category> Categories
  311. {
  312. get
  313. {
  314. return base.EntityContainer.GetEntitySet<Category>();
  315. }
  316. }
  317. /// <summary>
  318. /// Gets the set of <see cref="SqlAppointmentResource"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  319. /// </summary>
  320. public EntitySet<SqlAppointmentResource> SqlAppointmentResources
  321. {
  322. get
  323. {
  324. return base.EntityContainer.GetEntitySet<SqlAppointmentResource>();
  325. }
  326. }
  327. /// <summary>
  328. /// Gets the set of <see cref="SqlAppointment"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  329. /// </summary>
  330. public EntitySet<SqlAppointment> SqlAppointments
  331. {
  332. get
  333. {
  334. return base.EntityContainer.GetEntitySet<SqlAppointment>();
  335. }
  336. }
  337. /// <summary>
  338. /// Gets the set of <see cref="SqlExceptionAppointment"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  339. /// </summary>
  340. public EntitySet<SqlExceptionAppointment> SqlExceptionAppointments
  341. {
  342. get
  343. {
  344. return base.EntityContainer.GetEntitySet<SqlExceptionAppointment>();
  345. }
  346. }
  347. /// <summary>
  348. /// Gets the set of <see cref="SqlExceptionOccurrence"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  349. /// </summary>
  350. public EntitySet<SqlExceptionOccurrence> SqlExceptionOccurrences
  351. {
  352. get
  353. {
  354. return base.EntityContainer.GetEntitySet<SqlExceptionOccurrence>();
  355. }
  356. }
  357. /// <summary>
  358. /// Gets the set of <see cref="SqlExceptionResource"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  359. /// </summary>
  360. public EntitySet<SqlExceptionResource> SqlExceptionResources
  361. {
  362. get
  363. {
  364. return base.EntityContainer.GetEntitySet<SqlExceptionResource>();
  365. }
  366. }
  367. /// <summary>
  368. /// Gets the set of <see cref="SqlResource"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  369. /// </summary>
  370. public EntitySet<SqlResource> SqlResources
  371. {
  372. get
  373. {
  374. return base.EntityContainer.GetEntitySet<SqlResource>();
  375. }
  376. }
  377. /// <summary>
  378. /// Gets the set of <see cref="SqlResourceType"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  379. /// </summary>
  380. public EntitySet<SqlResourceType> SqlResourceTypes
  381. {
  382. get
  383. {
  384. return base.EntityContainer.GetEntitySet<SqlResourceType>();
  385. }
  386. }
  387. /// <summary>
  388. /// Gets the set of <see cref="TimeMarker"/> entity instances that have been loaded into this <see cref="ScheduleViewDomainContext"/> instance.
  389. /// </summary>
  390. public EntitySet<TimeMarker> TimeMarkers
  391. {
  392. get
  393. {
  394. return base.EntityContainer.GetEntitySet<TimeMarker>();
  395. }
  396. }
  397. /// <summary>
  398. /// Gets an EntityQuery instance that can be used to load <see cref="Category"/> entity instances using the 'GetCategories' query.
  399. /// </summary>
  400. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="Category"/> entity instances.</returns>
  401. public EntityQuery<Category> GetCategoriesQuery()
  402. {
  403. this.ValidateMethod("GetCategoriesQuery", null);
  404. return base.CreateQuery<Category>("GetCategories", null, false, true);
  405. }
  406. /// <summary>
  407. /// Gets an EntityQuery instance that can be used to load <see cref="SqlAppointmentResource"/> entity instances using the 'GetSqlAppointmentResourcesByRange' query.
  408. /// </summary>
  409. /// <param name="start">The value for the 'start' parameter of the query.</param>
  410. /// <param name="end">The value for the 'end' parameter of the query.</param>
  411. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="SqlAppointmentResource"/> entity instances.</returns>
  412. public EntityQuery<SqlAppointmentResource> GetSqlAppointmentResourcesByRangeQuery(DateTime start, DateTime end)
  413. {
  414. Dictionary<string, object> parameters = new Dictionary<string, object>();
  415. parameters.Add("start", start);
  416. parameters.Add("end", end);
  417. this.ValidateMethod("GetSqlAppointmentResourcesByRangeQuery", parameters);
  418. return base.CreateQuery<SqlAppointmentResource>("GetSqlAppointmentResourcesByRange", parameters, false, true);
  419. }
  420. /// <summary>
  421. /// Gets an EntityQuery instance that can be used to load <see cref="SqlAppointment"/> entity instances using the 'GetSqlAppointmentsByRange' query.
  422. /// </summary>
  423. /// <param name="start">The value for the 'start' parameter of the query.</param>
  424. /// <param name="end">The value for the 'end' parameter of the query.</param>
  425. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="SqlAppointment"/> entity instances.</returns>
  426. public EntityQuery<SqlAppointment> GetSqlAppointmentsByRangeQuery(DateTime start, DateTime end)
  427. {
  428. Dictionary<string, object> parameters = new Dictionary<string, object>();
  429. parameters.Add("start", start);
  430. parameters.Add("end", end);
  431. this.ValidateMethod("GetSqlAppointmentsByRangeQuery", parameters);
  432. return base.CreateQuery<SqlAppointment>("GetSqlAppointmentsByRange", parameters, false, true);
  433. }
  434. /// <summary>
  435. /// Gets an EntityQuery instance that can be used to load <see cref="SqlExceptionAppointment"/> entity instances using the 'GetSqlExceptionAppointmentsByRange' query.
  436. /// </summary>
  437. /// <param name="start">The value for the 'start' parameter of the query.</param>
  438. /// <param name="end">The value for the 'end' parameter of the query.</param>
  439. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="SqlExceptionAppointment"/> entity instances.</returns>
  440. public EntityQuery<SqlExceptionAppointment> GetSqlExceptionAppointmentsByRangeQuery(DateTime start, DateTime end)
  441. {
  442. Dictionary<string, object> parameters = new Dictionary<string, object>();
  443. parameters.Add("start", start);
  444. parameters.Add("end", end);
  445. this.ValidateMethod("GetSqlExceptionAppointmentsByRangeQuery", parameters);
  446. return base.CreateQuery<SqlExceptionAppointment>("GetSqlExceptionAppointmentsByRange", parameters, false, true);
  447. }
  448. /// <summary>
  449. /// Gets an EntityQuery instance that can be used to load <see cref="SqlExceptionOccurrence"/> entity instances using the 'GetSqlExceptionOccurrencesByRange' query.
  450. /// </summary>
  451. /// <param name="start">The value for the 'start' parameter of the query.</param>
  452. /// <param name="end">The value for the 'end' parameter of the query.</param>
  453. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="SqlExceptionOccurrence"/> entity instances.</returns>
  454. public EntityQuery<SqlExceptionOccurrence> GetSqlExceptionOccurrencesByRangeQuery(DateTime start, DateTime end)
  455. {
  456. Dictionary<string, object> parameters = new Dictionary<string, object>();
  457. parameters.Add("start", start);
  458. parameters.Add("end", end);
  459. this.ValidateMethod("GetSqlExceptionOccurrencesByRangeQuery", parameters);
  460. return base.CreateQuery<SqlExceptionOccurrence>("GetSqlExceptionOccurrencesByRange", parameters, false, true);
  461. }
  462. /// <summary>
  463. /// Gets an EntityQuery instance that can be used to load <see cref="SqlExceptionResource"/> entity instances using the 'GetSqlExceptionResourcesByRange' query.
  464. /// </summary>
  465. /// <param name="start">The value for the 'start' parameter of the query.</param>
  466. /// <param name="end">The value for the 'end' parameter of the query.</param>
  467. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="SqlExceptionResource"/> entity instances.</returns>
  468. public EntityQuery<SqlExceptionResource> GetSqlExceptionResourcesByRangeQuery(DateTime start, DateTime end)
  469. {
  470. Dictionary<string, object> parameters = new Dictionary<string, object>();
  471. parameters.Add("start", start);
  472. parameters.Add("end", end);
  473. this.ValidateMethod("GetSqlExceptionResourcesByRangeQuery", parameters);
  474. return base.CreateQuery<SqlExceptionResource>("GetSqlExceptionResourcesByRange", parameters, false, true);
  475. }
  476. /// <summary>
  477. /// Gets an EntityQuery instance that can be used to load <see cref="SqlResource"/> entity instances using the 'GetSqlResources' query.
  478. /// </summary>
  479. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="SqlResource"/> entity instances.</returns>
  480. public EntityQuery<SqlResource> GetSqlResourcesQuery()
  481. {
  482. this.ValidateMethod("GetSqlResourcesQuery", null);
  483. return base.CreateQuery<SqlResource>("GetSqlResources", null, false, true);
  484. }
  485. /// <summary>
  486. /// Gets an EntityQuery instance that can be used to load <see cref="SqlResourceType"/> entity instances using the 'GetSqlResourceTypes' query.
  487. /// </summary>
  488. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="SqlResourceType"/> entity instances.</returns>
  489. public EntityQuery<SqlResourceType> GetSqlResourceTypesQuery()
  490. {
  491. this.ValidateMethod("GetSqlResourceTypesQuery", null);
  492. return base.CreateQuery<SqlResourceType>("GetSqlResourceTypes", null, false, true);
  493. }
  494. /// <summary>
  495. /// Gets an EntityQuery instance that can be used to load <see cref="TimeMarker"/> entity instances using the 'GetTimeMarkers' query.
  496. /// </summary>
  497. /// <returns>An EntityQuery that can be loaded to retrieve <see cref="TimeMarker"/> entity instances.</returns>
  498. public EntityQuery<TimeMarker> GetTimeMarkersQuery()
  499. {
  500. this.ValidateMethod("GetTimeMarkersQuery", null);
  501. return base.CreateQuery<TimeMarker>("GetTimeMarkers", null, false, true);
  502. }
  503. /// <summary>
  504. /// Creates a new EntityContainer for this DomainContext's EntitySets.
  505. /// </summary>
  506. /// <returns>A new container instance.</returns>
  507. protected override EntityContainer CreateEntityContainer()
  508. {
  509. return new ScheduleViewDomainContextEntityContainer();
  510. }
  511. /// <summary>
  512. /// Service contract for the 'ScheduleViewDomainService' DomainService.
  513. /// </summary>
  514. [ServiceContract()]
  515. public interface IScheduleViewDomainServiceContract
  516. {
  517. /// <summary>
  518. /// Asynchronously invokes the 'GetCategories' operation.
  519. /// </summary>
  520. /// <param name="callback">Callback to invoke on completion.</param>
  521. /// <param name="asyncState">Optional state object.</param>
  522. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  523. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetCategoriesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  524. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetCategories", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetCategoriesResponse")]
  525. [WebGet()]
  526. IAsyncResult BeginGetCategories(AsyncCallback callback, object asyncState);
  527. /// <summary>
  528. /// Completes the asynchronous operation begun by 'BeginGetCategories'.
  529. /// </summary>
  530. /// <param name="result">The IAsyncResult returned from 'BeginGetCategories'.</param>
  531. /// <returns>The 'QueryResult' returned from the 'GetCategories' operation.</returns>
  532. QueryResult<Category> EndGetCategories(IAsyncResult result);
  533. /// <summary>
  534. /// Asynchronously invokes the 'GetSqlAppointmentResourcesByRange' operation.
  535. /// </summary>
  536. /// <param name="start">The value for the 'start' parameter of this action.</param>
  537. /// <param name="end">The value for the 'end' parameter of this action.</param>
  538. /// <param name="callback">Callback to invoke on completion.</param>
  539. /// <param name="asyncState">Optional state object.</param>
  540. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  541. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetSqlAppointmentResourcesByRangeDom" +
  542. "ainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  543. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetSqlAppointmentResourcesByRange", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetSqlAppointmentResourcesByRangeRes" +
  544. "ponse")]
  545. [WebGet()]
  546. IAsyncResult BeginGetSqlAppointmentResourcesByRange(DateTime start, DateTime end, AsyncCallback callback, object asyncState);
  547. /// <summary>
  548. /// Completes the asynchronous operation begun by 'BeginGetSqlAppointmentResourcesByRange'.
  549. /// </summary>
  550. /// <param name="result">The IAsyncResult returned from 'BeginGetSqlAppointmentResourcesByRange'.</param>
  551. /// <returns>The 'QueryResult' returned from the 'GetSqlAppointmentResourcesByRange' operation.</returns>
  552. QueryResult<SqlAppointmentResource> EndGetSqlAppointmentResourcesByRange(IAsyncResult result);
  553. /// <summary>
  554. /// Asynchronously invokes the 'GetSqlAppointmentsByRange' operation.
  555. /// </summary>
  556. /// <param name="start">The value for the 'start' parameter of this action.</param>
  557. /// <param name="end">The value for the 'end' parameter of this action.</param>
  558. /// <param name="callback">Callback to invoke on completion.</param>
  559. /// <param name="asyncState">Optional state object.</param>
  560. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  561. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetSqlAppointmentsByRangeDomainServi" +
  562. "ceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  563. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetSqlAppointmentsByRange", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetSqlAppointmentsByRangeResponse")]
  564. [WebGet()]
  565. IAsyncResult BeginGetSqlAppointmentsByRange(DateTime start, DateTime end, AsyncCallback callback, object asyncState);
  566. /// <summary>
  567. /// Completes the asynchronous operation begun by 'BeginGetSqlAppointmentsByRange'.
  568. /// </summary>
  569. /// <param name="result">The IAsyncResult returned from 'BeginGetSqlAppointmentsByRange'.</param>
  570. /// <returns>The 'QueryResult' returned from the 'GetSqlAppointmentsByRange' operation.</returns>
  571. QueryResult<SqlAppointment> EndGetSqlAppointmentsByRange(IAsyncResult result);
  572. /// <summary>
  573. /// Asynchronously invokes the 'GetSqlExceptionAppointmentsByRange' operation.
  574. /// </summary>
  575. /// <param name="start">The value for the 'start' parameter of this action.</param>
  576. /// <param name="end">The value for the 'end' parameter of this action.</param>
  577. /// <param name="callback">Callback to invoke on completion.</param>
  578. /// <param name="asyncState">Optional state object.</param>
  579. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  580. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionAppointmentsByRangeDo" +
  581. "mainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  582. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionAppointmentsByRange", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionAppointmentsByRangeRe" +
  583. "sponse")]
  584. [WebGet()]
  585. IAsyncResult BeginGetSqlExceptionAppointmentsByRange(DateTime start, DateTime end, AsyncCallback callback, object asyncState);
  586. /// <summary>
  587. /// Completes the asynchronous operation begun by 'BeginGetSqlExceptionAppointmentsByRange'.
  588. /// </summary>
  589. /// <param name="result">The IAsyncResult returned from 'BeginGetSqlExceptionAppointmentsByRange'.</param>
  590. /// <returns>The 'QueryResult' returned from the 'GetSqlExceptionAppointmentsByRange' operation.</returns>
  591. QueryResult<SqlExceptionAppointment> EndGetSqlExceptionAppointmentsByRange(IAsyncResult result);
  592. /// <summary>
  593. /// Asynchronously invokes the 'GetSqlExceptionOccurrencesByRange' operation.
  594. /// </summary>
  595. /// <param name="start">The value for the 'start' parameter of this action.</param>
  596. /// <param name="end">The value for the 'end' parameter of this action.</param>
  597. /// <param name="callback">Callback to invoke on completion.</param>
  598. /// <param name="asyncState">Optional state object.</param>
  599. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  600. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionOccurrencesByRangeDom" +
  601. "ainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  602. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionOccurrencesByRange", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionOccurrencesByRangeRes" +
  603. "ponse")]
  604. [WebGet()]
  605. IAsyncResult BeginGetSqlExceptionOccurrencesByRange(DateTime start, DateTime end, AsyncCallback callback, object asyncState);
  606. /// <summary>
  607. /// Completes the asynchronous operation begun by 'BeginGetSqlExceptionOccurrencesByRange'.
  608. /// </summary>
  609. /// <param name="result">The IAsyncResult returned from 'BeginGetSqlExceptionOccurrencesByRange'.</param>
  610. /// <returns>The 'QueryResult' returned from the 'GetSqlExceptionOccurrencesByRange' operation.</returns>
  611. QueryResult<SqlExceptionOccurrence> EndGetSqlExceptionOccurrencesByRange(IAsyncResult result);
  612. /// <summary>
  613. /// Asynchronously invokes the 'GetSqlExceptionResourcesByRange' operation.
  614. /// </summary>
  615. /// <param name="start">The value for the 'start' parameter of this action.</param>
  616. /// <param name="end">The value for the 'end' parameter of this action.</param>
  617. /// <param name="callback">Callback to invoke on completion.</param>
  618. /// <param name="asyncState">Optional state object.</param>
  619. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  620. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionResourcesByRangeDomai" +
  621. "nServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  622. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionResourcesByRange", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetSqlExceptionResourcesByRangeRespo" +
  623. "nse")]
  624. [WebGet()]
  625. IAsyncResult BeginGetSqlExceptionResourcesByRange(DateTime start, DateTime end, AsyncCallback callback, object asyncState);
  626. /// <summary>
  627. /// Completes the asynchronous operation begun by 'BeginGetSqlExceptionResourcesByRange'.
  628. /// </summary>
  629. /// <param name="result">The IAsyncResult returned from 'BeginGetSqlExceptionResourcesByRange'.</param>
  630. /// <returns>The 'QueryResult' returned from the 'GetSqlExceptionResourcesByRange' operation.</returns>
  631. QueryResult<SqlExceptionResource> EndGetSqlExceptionResourcesByRange(IAsyncResult result);
  632. /// <summary>
  633. /// Asynchronously invokes the 'GetSqlResources' operation.
  634. /// </summary>
  635. /// <param name="callback">Callback to invoke on completion.</param>
  636. /// <param name="asyncState">Optional state object.</param>
  637. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  638. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetSqlResourcesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  639. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetSqlResources", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetSqlResourcesResponse")]
  640. [WebGet()]
  641. IAsyncResult BeginGetSqlResources(AsyncCallback callback, object asyncState);
  642. /// <summary>
  643. /// Completes the asynchronous operation begun by 'BeginGetSqlResources'.
  644. /// </summary>
  645. /// <param name="result">The IAsyncResult returned from 'BeginGetSqlResources'.</param>
  646. /// <returns>The 'QueryResult' returned from the 'GetSqlResources' operation.</returns>
  647. QueryResult<SqlResource> EndGetSqlResources(IAsyncResult result);
  648. /// <summary>
  649. /// Asynchronously invokes the 'GetSqlResourceTypes' operation.
  650. /// </summary>
  651. /// <param name="callback">Callback to invoke on completion.</param>
  652. /// <param name="asyncState">Optional state object.</param>
  653. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  654. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetSqlResourceTypesDomainServiceFaul" +
  655. "t", Name="DomainServiceFault", Namespace="DomainServices")]
  656. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetSqlResourceTypes", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetSqlResourceTypesResponse")]
  657. [WebGet()]
  658. IAsyncResult BeginGetSqlResourceTypes(AsyncCallback callback, object asyncState);
  659. /// <summary>
  660. /// Completes the asynchronous operation begun by 'BeginGetSqlResourceTypes'.
  661. /// </summary>
  662. /// <param name="result">The IAsyncResult returned from 'BeginGetSqlResourceTypes'.</param>
  663. /// <returns>The 'QueryResult' returned from the 'GetSqlResourceTypes' operation.</returns>
  664. QueryResult<SqlResourceType> EndGetSqlResourceTypes(IAsyncResult result);
  665. /// <summary>
  666. /// Asynchronously invokes the 'GetTimeMarkers' operation.
  667. /// </summary>
  668. /// <param name="callback">Callback to invoke on completion.</param>
  669. /// <param name="asyncState">Optional state object.</param>
  670. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  671. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/GetTimeMarkersDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  672. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/GetTimeMarkers", ReplyAction="http://tempuri.org/ScheduleViewDomainService/GetTimeMarkersResponse")]
  673. [WebGet()]
  674. IAsyncResult BeginGetTimeMarkers(AsyncCallback callback, object asyncState);
  675. /// <summary>
  676. /// Completes the asynchronous operation begun by 'BeginGetTimeMarkers'.
  677. /// </summary>
  678. /// <param name="result">The IAsyncResult returned from 'BeginGetTimeMarkers'.</param>
  679. /// <returns>The 'QueryResult' returned from the 'GetTimeMarkers' operation.</returns>
  680. QueryResult<TimeMarker> EndGetTimeMarkers(IAsyncResult result);
  681. /// <summary>
  682. /// Asynchronously invokes the 'SubmitChanges' operation.
  683. /// </summary>
  684. /// <param name="changeSet">The change-set to submit.</param>
  685. /// <param name="callback">Callback to invoke on completion.</param>
  686. /// <param name="asyncState">Optional state object.</param>
  687. /// <returns>An IAsyncResult that can be used to monitor the request.</returns>
  688. [FaultContract(typeof(DomainServiceFault), Action="http://tempuri.org/ScheduleViewDomainService/SubmitChangesDomainServiceFault", Name="DomainServiceFault", Namespace="DomainServices")]
  689. [OperationContract(AsyncPattern=true, Action="http://tempuri.org/ScheduleViewDomainService/SubmitChanges", ReplyAction="http://tempuri.org/ScheduleViewDomainService/SubmitChangesResponse")]
  690. IAsyncResult BeginSubmitChanges(IEnumerable<ChangeSetEntry> changeSet, AsyncCallback callback, object asyncState);
  691. /// <summary>
  692. /// Completes the asynchronous operation begun by 'BeginSubmitChanges'.
  693. /// </summary>
  694. /// <param name="result">The IAsyncResult returned from 'BeginSubmitChanges'.</param>
  695. /// <returns>The collection of change-set entry elements returned from 'SubmitChanges'.</returns>
  696. IEnumerable<ChangeSetEntry> EndSubmitChanges(IAsyncResult result);
  697. }
  698. internal sealed class ScheduleViewDomainContextEntityContainer : EntityContainer
  699. {
  700. public ScheduleViewDomainContextEntityContainer()
  701. {
  702. this.CreateEntitySet<Category>(EntitySetOperations.All);
  703. this.CreateEntitySet<SqlAppointment>(EntitySetOperations.All);
  704. this.CreateEntitySet<SqlAppointmentResource>(EntitySetOperations.All);
  705. this.CreateEntitySet<SqlExceptionAppointment>(EntitySetOperations.All);
  706. this.CreateEntitySet<SqlExceptionOccurrence>(EntitySetOperations.All);
  707. this.CreateEntitySet<SqlExceptionResource>(EntitySetOperations.All);
  708. this.CreateEntitySet<SqlResource>(EntitySetOperations.All);
  709. this.CreateEntitySet<SqlResourceType>(EntitySetOperations.All);
  710. this.CreateEntitySet<TimeMarker>(EntitySetOperations.All);
  711. }
  712. }
  713. }
  714. /// <summary>
  715. /// The 'SqlAppointment' entity class.
  716. /// </summary>
  717. [DataContract(Namespace="http://schemas.datacontract.org/2004/07/ScheduleViewDB.Web")]
  718. public sealed partial class SqlAppointment : Entity
  719. {
  720. private string _body;
  721. private EntityRef<Category> _category;
  722. private Nullable<int> _categoryID;
  723. private DateTime _end;
  724. private int _importance;
  725. private bool _isAllDayEvent;
  726. private string _recurrencePattern;
  727. private int _sqlAppointmentId;
  728. private EntityCollection<SqlAppointmentResource> _sqlAppointmentResources;
  729. private EntityCollection<SqlExceptionOccurrence> _sqlExceptionOccurrences;
  730. private DateTime _start;
  731. private string _subject;
  732. private EntityRef<TimeMarker> _timeMarker;
  733. private Nullable<int> _timeMarkerID;
  734. private string _timeZoneString;
  735. #region Extensibility Method Definitions
  736. /// <summary>
  737. /// This method is invoked from the constructor once initialization is complete and
  738. /// can be used for further object setup.
  739. /// </summary>
  740. partial void OnCreated();
  741. partial void OnBodyChanging(string value);
  742. partial void OnBodyChanged();
  743. partial void OnCategoryIDChanging(Nullable<int> value);
  744. partial void OnCategoryIDChanged();
  745. partial void OnEndChanging(DateTime value);
  746. partial void OnEndChanged();
  747. partial void OnImportanceChanging(int value);
  748. partial void OnImportanceChanged();
  749. partial void OnIsAllDayEventChanging(bool value);
  750. partial void OnIsAllDayEventChanged();
  751. partial void OnRecurrencePatternChanging(string value);
  752. partial void OnRecurrencePatternChanged();
  753. partial void OnSqlAppointmentIdChanging(int value);
  754. partial void OnSqlAppointmentIdChanged();
  755. partial void OnStartChanging(DateTime value);
  756. partial void OnStartChanged();
  757. partial void OnSubjectChanging(string value);
  758. partial void OnSubjectChanged();
  759. partial void OnTimeMarkerIDChanging(Nullable<int> value);
  760. partial void OnTimeMarkerIDChanged();
  761. partial void OnTimeZoneStringChanging(string value);
  762. partial void OnTimeZoneStringChanged();
  763. #endregion
  764. /// <summary>
  765. /// Initializes a new instance of the <see cref="SqlAppointment"/> class.
  766. /// </summary>
  767. public SqlAppointment()
  768. {
  769. this.OnCreated();
  770. }
  771. /// <summary>
  772. /// Gets or sets the 'Body' value.
  773. /// </summary>
  774. [DataMember()]
  775. [StringLength(500)]
  776. public string Body
  777. {
  778. get
  779. {
  780. return this._body;
  781. }
  782. set
  783. {
  784. if ((this._body != value))
  785. {
  786. this.OnBodyChanging(value);
  787. this.RaiseDataMemberChanging("Body");
  788. this.ValidateProperty("Body", value);
  789. this._body = value;
  790. this.RaiseDataMemberChanged("Body");
  791. this.OnBodyChanged();
  792. }
  793. }
  794. }
  795. /// <summary>
  796. /// Gets or sets the associated <see cref="Category"/> entity.
  797. /// </summary>
  798. [Association("Category_SqlAppointment", "CategoryID", "CategoryID", IsForeignKey=true)]
  799. [XmlIgnore()]
  800. public Category Category
  801. {
  802. get
  803. {
  804. if ((this._category == null))
  805. {
  806. this._category = new EntityRef<Category>(this, "Category", this.FilterCategory);
  807. }
  808. return this._category.Entity;
  809. }
  810. set
  811. {
  812. Category previous = this.Category;
  813. if ((previous != value))
  814. {
  815. this.ValidateProperty("Category", value);
  816. if ((previous != null))
  817. {
  818. this._category.Entity = null;
  819. previous.SqlAppointments.Remove(this);
  820. }
  821. if ((value != null))
  822. {
  823. this.CategoryID = value.CategoryID;
  824. }
  825. else
  826. {
  827. this.CategoryID = default(Nullable<int>);
  828. }
  829. this._category.Entity = value;
  830. if ((value != null))
  831. {
  832. value.SqlAppointments.Add(this);
  833. }
  834. this.RaisePropertyChanged("Category");
  835. }
  836. }
  837. }
  838. /// <summary>
  839. /// Gets or sets the 'CategoryID' value.
  840. /// </summary>
  841. [DataMember()]
  842. [RoundtripOriginal()]
  843. public Nullable<int> CategoryID
  844. {
  845. get
  846. {
  847. return this._categoryID;
  848. }
  849. set
  850. {
  851. if ((this._categoryID != value))
  852. {
  853. this.OnCategoryIDChanging(value);
  854. this.RaiseDataMemberChanging("CategoryID");
  855. this.ValidateProperty("CategoryID", value);
  856. this._categoryID = value;
  857. this.RaiseDataMemberChanged("CategoryID");
  858. this.OnCategoryIDChanged();
  859. }
  860. }
  861. }
  862. /// <summary>
  863. /// Gets or sets the 'End' value.
  864. /// </summary>
  865. [DataMember()]
  866. public DateTime End
  867. {
  868. get
  869. {
  870. return this._end;
  871. }
  872. set
  873. {
  874. if ((this._end != value))
  875. {
  876. this.OnEndChanging(value);
  877. this.RaiseDataMemberChanging("End");
  878. this.ValidateProperty("End", value);
  879. this._end = value;
  880. this.RaiseDataMemberChanged("End");
  881. this.OnEndChanged();
  882. }
  883. }
  884. }
  885. /// <summary>
  886. /// Gets or sets the 'Importance' value.
  887. /// </summary>
  888. [DataMember()]
  889. public int Importance
  890. {
  891. get
  892. {
  893. return this._importance;
  894. }
  895. set
  896. {
  897. if ((this._importance != value))
  898. {
  899. this.OnImportanceChanging(value);
  900. this.RaiseDataMemberChanging("Importance");
  901. this.ValidateProperty("Importance", value);
  902. this._importance = value;
  903. this.RaiseDataMemberChanged("Importance");
  904. this.OnImportanceChanged();
  905. }
  906. }
  907. }
  908. /// <summary>
  909. /// Gets or sets the 'IsAllDayEvent' value.
  910. /// </summary>
  911. [DataMember()]
  912. public bool IsAllDayEvent
  913. {
  914. get
  915. {
  916. return this._isAllDayEvent;
  917. }
  918. set
  919. {
  920. if ((this._isAllDayEvent != value))
  921. {
  922. this.OnIsAllDayEventChanging(value);
  923. this.RaiseDataMemberChanging("IsAllDayEvent");
  924. this.ValidateProperty("IsAllDayEvent", value);
  925. this._isAllDayEvent = value;
  926. this.RaiseDataMemberChanged("IsAllDayEvent");
  927. this.OnIsAllDayEventChanged();
  928. }
  929. }
  930. }
  931. /// <summary>
  932. /// Gets or sets the 'RecurrencePattern' value.
  933. /// </summary>
  934. [DataMember()]
  935. [StringLength(100)]
  936. public string RecurrencePattern
  937. {
  938. get
  939. {
  940. return this._recurrencePattern;
  941. }
  942. set
  943. {
  944. if ((this._recurrencePattern != value))
  945. {
  946. this.OnRecurrencePatternChanging(value);
  947. this.RaiseDataMemberChanging("RecurrencePattern");
  948. this.ValidateProperty("RecurrencePattern", value);
  949. this._recurrencePattern = value;
  950. this.RaiseDataMemberChanged("RecurrencePattern");
  951. this.OnRecurrencePatternChanged();
  952. }
  953. }
  954. }
  955. /// <summary>
  956. /// Gets or sets the 'SqlAppointmentId' value.
  957. /// </summary>
  958. [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  959. [DataMember()]
  960. [Editable(false, AllowInitialValue=true)]
  961. [Key()]
  962. [RoundtripOriginal()]
  963. public int SqlAppointmentId
  964. {
  965. get
  966. {
  967. return this._sqlAppointmentId;
  968. }
  969. set
  970. {
  971. if ((this._sqlAppointmentId != value))
  972. {
  973. this.OnSqlAppointmentIdChanging(value);
  974. this.ValidateProperty("SqlAppointmentId", value);
  975. this._sqlAppointmentId = value;
  976. this.RaisePropertyChanged("SqlAppointmentId");
  977. this.OnSqlAppointmentIdChanged();
  978. }
  979. }
  980. }
  981. /// <summary>
  982. /// Gets the collection of associated <see cref="SqlAppointmentResource"/> entity instances.
  983. /// </summary>
  984. [Association("SqlAppointment_SqlAppointmentResource…

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