MyModel.Context.cs 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // Этот код создан по шаблону.
  4. //
  5. // Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
  6. // Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
  7. // </auto-generated>
  8. //------------------------------------------------------------------------------
  9. namespace Ageev_Exam_Tour.Model
  10. {
  11. using System;
  12. using System.Data.Entity;
  13. using System.Data.Entity.Infrastructure;
  14. using System.Data.Entity.Core.Objects;
  15. using System.Linq;
  16. public partial class Ageev_ExamEntities : DbContext
  17. {
  18. public Ageev_ExamEntities()
  19. : base("name=Ageev_ExamEntities")
  20. {
  21. }
  22. protected override void OnModelCreating(DbModelBuilder modelBuilder)
  23. {
  24. throw new UnintentionalCodeFirstException();
  25. }
  26. public virtual DbSet<Country> Country { get; set; }
  27. public virtual DbSet<Hotel> Hotel { get; set; }
  28. public virtual DbSet<HotelComment> HotelComment { get; set; }
  29. public virtual DbSet<HotelImage> HotelImage { get; set; }
  30. public virtual DbSet<Tour> Tour { get; set; }
  31. public virtual DbSet<Type> Type { get; set; }
  32. public virtual int sp_alterdiagram(string diagramname, Nullable<int> owner_id, Nullable<int> version, byte[] definition)
  33. {
  34. var diagramnameParameter = diagramname != null ?
  35. new ObjectParameter("diagramname", diagramname) :
  36. new ObjectParameter("diagramname", typeof(string));
  37. var owner_idParameter = owner_id.HasValue ?
  38. new ObjectParameter("owner_id", owner_id) :
  39. new ObjectParameter("owner_id", typeof(int));
  40. var versionParameter = version.HasValue ?
  41. new ObjectParameter("version", version) :
  42. new ObjectParameter("version", typeof(int));
  43. var definitionParameter = definition != null ?
  44. new ObjectParameter("definition", definition) :
  45. new ObjectParameter("definition", typeof(byte[]));
  46. return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("sp_alterdiagram", diagramnameParameter, owner_idParameter, versionParameter, definitionParameter);
  47. }
  48. public virtual int sp_creatediagram(string diagramname, Nullable<int> owner_id, Nullable<int> version, byte[] definition)
  49. {
  50. var diagramnameParameter = diagramname != null ?
  51. new ObjectParameter("diagramname", diagramname) :
  52. new ObjectParameter("diagramname", typeof(string));
  53. var owner_idParameter = owner_id.HasValue ?
  54. new ObjectParameter("owner_id", owner_id) :
  55. new ObjectParameter("owner_id", typeof(int));
  56. var versionParameter = version.HasValue ?
  57. new ObjectParameter("version", version) :
  58. new ObjectParameter("version", typeof(int));
  59. var definitionParameter = definition != null ?
  60. new ObjectParameter("definition", definition) :
  61. new ObjectParameter("definition", typeof(byte[]));
  62. return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("sp_creatediagram", diagramnameParameter, owner_idParameter, versionParameter, definitionParameter);
  63. }
  64. public virtual int sp_dropdiagram(string diagramname, Nullable<int> owner_id)
  65. {
  66. var diagramnameParameter = diagramname != null ?
  67. new ObjectParameter("diagramname", diagramname) :
  68. new ObjectParameter("diagramname", typeof(string));
  69. var owner_idParameter = owner_id.HasValue ?
  70. new ObjectParameter("owner_id", owner_id) :
  71. new ObjectParameter("owner_id", typeof(int));
  72. return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("sp_dropdiagram", diagramnameParameter, owner_idParameter);
  73. }
  74. public virtual ObjectResult<sp_helpdiagramdefinition_Result> sp_helpdiagramdefinition(string diagramname, Nullable<int> owner_id)
  75. {
  76. var diagramnameParameter = diagramname != null ?
  77. new ObjectParameter("diagramname", diagramname) :
  78. new ObjectParameter("diagramname", typeof(string));
  79. var owner_idParameter = owner_id.HasValue ?
  80. new ObjectParameter("owner_id", owner_id) :
  81. new ObjectParameter("owner_id", typeof(int));
  82. return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<sp_helpdiagramdefinition_Result>("sp_helpdiagramdefinition", diagramnameParameter, owner_idParameter);
  83. }
  84. public virtual ObjectResult<sp_helpdiagrams_Result> sp_helpdiagrams(string diagramname, Nullable<int> owner_id)
  85. {
  86. var diagramnameParameter = diagramname != null ?
  87. new ObjectParameter("diagramname", diagramname) :
  88. new ObjectParameter("diagramname", typeof(string));
  89. var owner_idParameter = owner_id.HasValue ?
  90. new ObjectParameter("owner_id", owner_id) :
  91. new ObjectParameter("owner_id", typeof(int));
  92. return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<sp_helpdiagrams_Result>("sp_helpdiagrams", diagramnameParameter, owner_idParameter);
  93. }
  94. public virtual int sp_renamediagram(string diagramname, Nullable<int> owner_id, string new_diagramname)
  95. {
  96. var diagramnameParameter = diagramname != null ?
  97. new ObjectParameter("diagramname", diagramname) :
  98. new ObjectParameter("diagramname", typeof(string));
  99. var owner_idParameter = owner_id.HasValue ?
  100. new ObjectParameter("owner_id", owner_id) :
  101. new ObjectParameter("owner_id", typeof(int));
  102. var new_diagramnameParameter = new_diagramname != null ?
  103. new ObjectParameter("new_diagramname", new_diagramname) :
  104. new ObjectParameter("new_diagramname", typeof(string));
  105. return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("sp_renamediagram", diagramnameParameter, owner_idParameter, new_diagramnameParameter);
  106. }
  107. public virtual int sp_upgraddiagrams()
  108. {
  109. return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("sp_upgraddiagrams");
  110. }
  111. }
  112. }