Skip to content
Snippets Groups Projects
Commit a7d1ecca authored by HUONG THOMAS's avatar HUONG THOMAS
Browse files

bdd update

parent 6f3e9e40
Branches
No related merge requests found
Showing
with 220 additions and 7 deletions
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -8,7 +8,7 @@ namespace fichier1.Data ...@@ -8,7 +8,7 @@ namespace fichier1.Data
public class BddContext : DbContext public class BddContext : DbContext
{ {
public BddContext() public BddContext()
: base(new DbContextOptionsBuilder<BddContext>().UseSqlite("Data Source=C:\\Users\\Valentin\\Documents\\t4-foc21\\fichier1\\fichier1\\bin\\Debug\\netcoreapp3.1\\Bdd.db").Options) : base(new DbContextOptionsBuilder<BddContext>().UseSqlite("Data Source=C:\\Users\\frees\\Documents\\Ecole temp\\t4-foc21\\fichier1\\fichier1\\bin\\Debug\\netcoreapp3.1\\Bdd.db").Options)
{ {
} }
......
// <auto-generated />
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using fichier1.Data;
namespace fichier1.Migrations
{
[DbContext(typeof(BddContext))]
[Migration("20210329135230_init")]
partial class init
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "5.0.4");
modelBuilder.Entity("fichier1.Data.Prefixe", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Description")
.HasColumnType("TEXT");
b.Property<string>("Pre")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Prefixes");
});
modelBuilder.Entity("fichier1.Data.Radical", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Description")
.HasColumnType("TEXT");
b.Property<string>("Rad")
.HasColumnType("TEXT");
b.Property<string>("Terminaison")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Radicals");
});
modelBuilder.Entity("fichier1.Data.Suffixe", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Description")
.HasColumnType("TEXT");
b.Property<string>("Suf")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Suffixes");
});
#pragma warning restore 612, 618
}
}
}
using Microsoft.EntityFrameworkCore.Migrations;
namespace fichier1.Migrations
{
public partial class init : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Prefixes",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Pre = table.Column<string>(type: "TEXT", nullable: true),
Description = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Prefixes", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Radicals",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Rad = table.Column<string>(type: "TEXT", nullable: true),
Terminaison = table.Column<string>(type: "TEXT", nullable: true),
Description = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Radicals", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Suffixes",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Suf = table.Column<string>(type: "TEXT", nullable: true),
Description = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Suffixes", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Prefixes");
migrationBuilder.DropTable(
name: "Radicals");
migrationBuilder.DropTable(
name: "Suffixes");
}
}
}
// <auto-generated />
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using fichier1.Data;
namespace fichier1.Migrations
{
[DbContext(typeof(BddContext))]
partial class BddContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "5.0.4");
modelBuilder.Entity("fichier1.Data.Prefixe", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Description")
.HasColumnType("TEXT");
b.Property<string>("Pre")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Prefixes");
});
modelBuilder.Entity("fichier1.Data.Radical", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Description")
.HasColumnType("TEXT");
b.Property<string>("Rad")
.HasColumnType("TEXT");
b.Property<string>("Terminaison")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Radicals");
});
modelBuilder.Entity("fichier1.Data.Suffixe", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Description")
.HasColumnType("TEXT");
b.Property<string>("Suf")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Suffixes");
});
#pragma warning restore 612, 618
}
}
}
...@@ -32,14 +32,14 @@ namespace fichier1 ...@@ -32,14 +32,14 @@ namespace fichier1
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
serviceCollection.AddSingleton<Form1>(); //serviceCollection.AddSingleton<Form1>();
serviceCollection.AddScoped<IService, Service>(); serviceCollection.AddScoped<IService, Service>();
ServiceProvider = serviceCollection.BuildServiceProvider(); ServiceProvider = serviceCollection.BuildServiceProvider();
ServiceProvider.GetRequiredService<BddContext>().Database.EnsureCreated(); ServiceProvider.GetRequiredService<BddContext>().Database.EnsureCreated();
var form1 = ServiceProvider.GetRequiredService<Form1>(); //var form1 = ServiceProvider.GetRequiredService<Form1>();
Application.Run(form1); //Application.Run(form1);
} }
} }
} }
File added
No preview for this file type
No preview for this file type
No preview for this file type
File deleted
No preview for this file type
2d018a7c2b3d8f0ccc64fc08d661c6bf967d851a 51ad440e43d1558f6663f294299f0089041e6e37
...@@ -38,8 +38,6 @@ C:\Users\frees\Documents\Ecole temp\t4-foc21\fichier1\fichier1\bin\Debug\netcore ...@@ -38,8 +38,6 @@ C:\Users\frees\Documents\Ecole temp\t4-foc21\fichier1\fichier1\bin\Debug\netcore
C:\Users\frees\Documents\Ecole temp\t4-foc21\fichier1\fichier1\bin\Debug\netcoreapp3.1\runtimes\win-x86\native\Microsoft.Data.SqlClient.SNI.dll C:\Users\frees\Documents\Ecole temp\t4-foc21\fichier1\fichier1\bin\Debug\netcoreapp3.1\runtimes\win-x86\native\Microsoft.Data.SqlClient.SNI.dll
C:\Users\frees\Documents\Ecole temp\t4-foc21\fichier1\fichier1\bin\Debug\netcoreapp3.1\runtimes\win-x86\native\Microsoft.Data.SqlClient.SNI.pdb C:\Users\frees\Documents\Ecole temp\t4-foc21\fichier1\fichier1\bin\Debug\netcoreapp3.1\runtimes\win-x86\native\Microsoft.Data.SqlClient.SNI.pdb
C:\Users\frees\Documents\Ecole temp\t4-foc21\fichier1\fichier1\bin\Debug\netcoreapp3.1\runtimes\win\lib\netstandard2.0\System.Runtime.Caching.dll C:\Users\frees\Documents\Ecole temp\t4-foc21\fichier1\fichier1\bin\Debug\netcoreapp3.1\runtimes\win\lib\netstandard2.0\System.Runtime.Caching.dll
C:\Users\frees\Documents\Ecole temp\t4-foc21\fichier1\fichier1\obj\Debug\netcoreapp3.1\fichier1.Form1.resources
C:\Users\frees\Documents\Ecole temp\t4-foc21\fichier1\fichier1\obj\Debug\netcoreapp3.1\fichier1.csproj.GenerateResource.cache
C:\Users\frees\Documents\Ecole temp\t4-foc21\fichier1\fichier1\obj\Debug\netcoreapp3.1\fichier1.AssemblyInfoInputs.cache C:\Users\frees\Documents\Ecole temp\t4-foc21\fichier1\fichier1\obj\Debug\netcoreapp3.1\fichier1.AssemblyInfoInputs.cache
C:\Users\frees\Documents\Ecole temp\t4-foc21\fichier1\fichier1\obj\Debug\netcoreapp3.1\fichier1.AssemblyInfo.cs C:\Users\frees\Documents\Ecole temp\t4-foc21\fichier1\fichier1\obj\Debug\netcoreapp3.1\fichier1.AssemblyInfo.cs
C:\Users\frees\Documents\Ecole temp\t4-foc21\fichier1\fichier1\obj\Debug\netcoreapp3.1\fichier1.csproj.CoreCompileInputs.cache C:\Users\frees\Documents\Ecole temp\t4-foc21\fichier1\fichier1\obj\Debug\netcoreapp3.1\fichier1.csproj.CoreCompileInputs.cache
......
File deleted
No preview for this file type
No preview for this file type
No preview for this file type
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment