Model1.Context.cs 6.6 KB

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