1 день 2 年 前
コミット
ec0db09e7d

+ 6 - 1
WpfApp1/MainWindow.xaml

@@ -7,6 +7,11 @@
         mc:Ignorable="d"
         Title="MainWindow" Height="450" Width="800">
     <Grid>
-        
+        <Grid.RowDefinitions>
+            
+        </Grid.RowDefinitions>
+        <DockPanel>
+            
+        </DockPanel>
     </Grid>
 </Window>

+ 4 - 0
WpfApp1/MainWindow.xaml.cs

@@ -20,9 +20,13 @@ namespace WpfApp1
     /// </summary>
     public partial class MainWindow : Window
     {
+        private object dd;
+
         public MainWindow()
         {
             InitializeComponent();
+
+   
         }
     }
 }

+ 30 - 0
WpfApp1/Model1.Context.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace WpfApp1
+{
+    using System;
+    using System.Data.Entity;
+    using System.Data.Entity.Infrastructure;
+    
+    public partial class Entities : DbContext
+    {
+        public Entities()
+            : base("name=Entities")
+        {
+        }
+    
+        protected override void OnModelCreating(DbModelBuilder modelBuilder)
+        {
+            throw new UnintentionalCodeFirstException();
+        }
+    
+        public virtual DbSet<r> r { get; set; }
+    }
+}

+ 32 - 6
WpfApp1/Model1.edmx

@@ -4,20 +4,46 @@
   <edmx:Runtime>
     <!-- SSDL content -->
     <edmx:StorageModels>
-      <Schema Namespace="Хранилище Model" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
-        <EntityContainer Name="Хранилище ModelContainer" />
-      </Schema>
-    </edmx:StorageModels>
+    <Schema Namespace="Хранилище Model" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
+        <EntityType Name="r">
+          <Key>
+            <PropertyRef Name="r" />
+          </Key>
+          <Property Name="r" Type="int" Nullable="false" />
+          <Property Name="4" Type="nchar" MaxLength="10" />
+        </EntityType>
+        <EntityContainer Name="Хранилище ModelContainer">
+          <EntitySet Name="r" EntityType="Self.r" Schema="dbo" store:Type="Tables" />
+        </EntityContainer>
+      </Schema></edmx:StorageModels>
     <!-- CSDL content -->
     <edmx:ConceptualModels>
       <Schema Namespace="Model" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
-        <EntityContainer Name="Entities" annotation:LazyLoadingEnabled="true" />
+        <EntityContainer Name="Entities" annotation:LazyLoadingEnabled="true" >
+          <EntitySet Name="r" EntityType="Model.r" />
+        </EntityContainer>
+        <EntityType Name="r">
+          <Key>
+            <PropertyRef Name="r1" />
+          </Key>
+          <Property Name="r1" Type="Int32" Nullable="false" />
+          <Property Name="C4" Type="String" MaxLength="10" FixedLength="true" Unicode="true" />
+        </EntityType>
       </Schema>
     </edmx:ConceptualModels>
     <!-- C-S mapping content -->
     <edmx:Mappings>
       <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
-        <EntityContainerMapping StorageEntityContainer="Хранилище ModelContainer" CdmEntityContainer="Entities" />
+        <EntityContainerMapping StorageEntityContainer="Хранилище ModelContainer" CdmEntityContainer="Entities" >
+          <EntitySetMapping Name="r">
+            <EntityTypeMapping TypeName="Model.r">
+              <MappingFragment StoreEntitySet="r">
+                <ScalarProperty Name="C4" ColumnName="4" />
+                <ScalarProperty Name="r1" ColumnName="r" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+        </EntityContainerMapping>
       </Mapping>
     </edmx:Mappings>
   </edmx:Runtime>

+ 3 - 1
WpfApp1/Model1.edmx.diagram

@@ -4,7 +4,9 @@
   <edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
     <!-- Diagram content (shape and connector positions) -->
     <edmx:Diagrams>
-      <Diagram DiagramId="f6348b693e894f4cac458e5b9060cccb" Name="Diagram1" />
+      <Diagram DiagramId="f6348b693e894f4cac458e5b9060cccb" Name="Diagram1" >
+        <EntityTypeShape EntityType="Model.r" Width="1.5" PointX="0.75" PointY="0.75" />
+      </Diagram>
     </edmx:Diagrams>
   </edmx:Designer>
 </edmx:Edmx>

+ 3 - 0
WpfApp1/WpfApp1.csproj

@@ -138,5 +138,8 @@
       <LastGenOutput>Model1.cs</LastGenOutput>
     </Content>
   </ItemGroup>
+  <ItemGroup>
+    <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>