Model1.Context.cs 7.1 KB

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