DataBase.Context.cs 6.9 KB

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