diff --git a/DugunSalonu.csproj b/DugunSalonu.csproj
index 663fdb8..2536c19 100644
--- a/DugunSalonu.csproj
+++ b/DugunSalonu.csproj
@@ -8,4 +8,30 @@
enable
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Form1.Designer.cs b/Form1.Designer.cs
deleted file mode 100644
index 69abb3f..0000000
--- a/Form1.Designer.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-namespace DugunSalonu
-{
- partial class Form1
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- SuspendLayout();
- //
- // Form1
- //
- AutoScaleDimensions = new SizeF(7F, 15F);
- AutoScaleMode = AutoScaleMode.Font;
- ClientSize = new Size(999, 620);
- Name = "Form1";
- Text = "Form1";
- ResumeLayout(false);
- }
-
- #endregion
- }
-}
diff --git a/Form1.cs b/Form1.cs
deleted file mode 100644
index 198e0ed..0000000
--- a/Form1.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace DugunSalonu
-{
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/FrmAddKullanici.Designer.cs b/FrmAddKullanici.Designer.cs
new file mode 100644
index 0000000..86253e4
--- /dev/null
+++ b/FrmAddKullanici.Designer.cs
@@ -0,0 +1,247 @@
+namespace DugunSalonu
+{
+ partial class FrmAddKullanici
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ label1 = new Label();
+ label2 = new Label();
+ label3 = new Label();
+ label4 = new Label();
+ label5 = new Label();
+ txtAdi = new TextBox();
+ txtSoyadi = new TextBox();
+ txtKullaniciAdi = new TextBox();
+ contextMenuStrip1 = new ContextMenuStrip(components);
+ txtParola = new TextBox();
+ txtParolatekrar = new TextBox();
+ btnEkle = new Button();
+ btnVazgec = new Button();
+ txtEposta = new TextBox();
+ label6 = new Label();
+ txtCeptel = new TextBox();
+ label7 = new Label();
+ SuspendLayout();
+ //
+ // label1
+ //
+ label1.AutoSize = true;
+ label1.Font = new Font("Segoe UI", 9F, FontStyle.Bold);
+ label1.Location = new Point(54, 20);
+ label1.Name = "label1";
+ label1.Size = new Size(25, 15);
+ label1.TabIndex = 0;
+ label1.Text = "Adı";
+ //
+ // label2
+ //
+ label2.AutoSize = true;
+ label2.Font = new Font("Segoe UI", 9F, FontStyle.Bold);
+ label2.Location = new Point(39, 49);
+ label2.Name = "label2";
+ label2.Size = new Size(43, 15);
+ label2.TabIndex = 1;
+ label2.Text = "Soyadı";
+ //
+ // label3
+ //
+ label3.AutoSize = true;
+ label3.Font = new Font("Segoe UI", 9F, FontStyle.Bold);
+ label3.Location = new Point(9, 78);
+ label3.Name = "label3";
+ label3.Size = new Size(71, 15);
+ label3.TabIndex = 2;
+ label3.Text = "Kullancı Adı";
+ //
+ // label4
+ //
+ label4.AutoSize = true;
+ label4.Font = new Font("Segoe UI", 9F, FontStyle.Bold);
+ label4.Location = new Point(39, 107);
+ label4.Name = "label4";
+ label4.Size = new Size(41, 15);
+ label4.TabIndex = 3;
+ label4.Text = "Parola";
+ //
+ // label5
+ //
+ label5.AutoSize = true;
+ label5.Font = new Font("Segoe UI", 9F, FontStyle.Bold);
+ label5.Location = new Point(4, 131);
+ label5.Name = "label5";
+ label5.Size = new Size(80, 15);
+ label5.TabIndex = 4;
+ label5.Text = "Parola Tekrar";
+ //
+ // txtAdi
+ //
+ txtAdi.Location = new Point(85, 12);
+ txtAdi.Name = "txtAdi";
+ txtAdi.Size = new Size(155, 23);
+ txtAdi.TabIndex = 5;
+ //
+ // txtSoyadi
+ //
+ txtSoyadi.Location = new Point(85, 41);
+ txtSoyadi.Name = "txtSoyadi";
+ txtSoyadi.Size = new Size(155, 23);
+ txtSoyadi.TabIndex = 6;
+ //
+ // txtKullaniciAdi
+ //
+ txtKullaniciAdi.Location = new Point(85, 70);
+ txtKullaniciAdi.Name = "txtKullaniciAdi";
+ txtKullaniciAdi.Size = new Size(155, 23);
+ txtKullaniciAdi.TabIndex = 7;
+ //
+ // contextMenuStrip1
+ //
+ contextMenuStrip1.Name = "contextMenuStrip1";
+ contextMenuStrip1.Size = new Size(61, 4);
+ //
+ // txtParola
+ //
+ txtParola.Location = new Point(85, 99);
+ txtParola.Name = "txtParola";
+ txtParola.Size = new Size(155, 23);
+ txtParola.TabIndex = 9;
+ txtParola.UseSystemPasswordChar = true;
+ //
+ // txtParolatekrar
+ //
+ txtParolatekrar.Location = new Point(85, 128);
+ txtParolatekrar.Name = "txtParolatekrar";
+ txtParolatekrar.Size = new Size(155, 23);
+ txtParolatekrar.TabIndex = 10;
+ txtParolatekrar.UseSystemPasswordChar = true;
+ //
+ // btnEkle
+ //
+ btnEkle.Location = new Point(86, 233);
+ btnEkle.Name = "btnEkle";
+ btnEkle.Size = new Size(75, 28);
+ btnEkle.TabIndex = 11;
+ btnEkle.Text = "Ekle";
+ btnEkle.UseVisualStyleBackColor = true;
+ btnEkle.Click += btnEkle_Click;
+ //
+ // btnVazgec
+ //
+ btnVazgec.Location = new Point(167, 233);
+ btnVazgec.Name = "btnVazgec";
+ btnVazgec.Size = new Size(75, 28);
+ btnVazgec.TabIndex = 12;
+ btnVazgec.Text = "Vazgeç";
+ btnVazgec.UseVisualStyleBackColor = true;
+ btnVazgec.Click += btnVazgec_Click;
+ //
+ // txtEposta
+ //
+ txtEposta.Location = new Point(86, 157);
+ txtEposta.Name = "txtEposta";
+ txtEposta.Size = new Size(155, 23);
+ txtEposta.TabIndex = 14;
+ //
+ // label6
+ //
+ label6.AutoSize = true;
+ label6.Font = new Font("Segoe UI", 9F, FontStyle.Bold);
+ label6.Location = new Point(36, 165);
+ label6.Name = "label6";
+ label6.Size = new Size(43, 15);
+ label6.TabIndex = 13;
+ label6.Text = "Eposta";
+ //
+ // txtCeptel
+ //
+ txtCeptel.Location = new Point(86, 189);
+ txtCeptel.Name = "txtCeptel";
+ txtCeptel.Size = new Size(155, 23);
+ txtCeptel.TabIndex = 16;
+ //
+ // label7
+ //
+ label7.AutoSize = true;
+ label7.Font = new Font("Segoe UI", 9F, FontStyle.Bold);
+ label7.Location = new Point(0, 197);
+ label7.Name = "label7";
+ label7.Size = new Size(80, 15);
+ label7.TabIndex = 15;
+ label7.Text = "Cep Telefonu";
+ //
+ // FrmAddKullanici
+ //
+ AcceptButton = btnEkle;
+ AutoScaleDimensions = new SizeF(7F, 15F);
+ AutoScaleMode = AutoScaleMode.Font;
+ BackColor = SystemColors.ActiveCaption;
+ CancelButton = btnVazgec;
+ ClientSize = new Size(252, 273);
+ Controls.Add(txtCeptel);
+ Controls.Add(label7);
+ Controls.Add(txtEposta);
+ Controls.Add(label6);
+ Controls.Add(btnVazgec);
+ Controls.Add(btnEkle);
+ Controls.Add(txtParolatekrar);
+ Controls.Add(txtParola);
+ Controls.Add(txtKullaniciAdi);
+ Controls.Add(txtSoyadi);
+ Controls.Add(txtAdi);
+ Controls.Add(label5);
+ Controls.Add(label4);
+ Controls.Add(label3);
+ Controls.Add(label2);
+ Controls.Add(label1);
+ Name = "FrmAddKullanici";
+ Text = "Kullanıcı Ekleme";
+ ResumeLayout(false);
+ PerformLayout();
+ }
+
+ #endregion
+
+ private Label label1;
+ private Label label2;
+ private Label label3;
+ private Label label4;
+ private Label label5;
+ private TextBox txtAdi;
+ private TextBox txtSoyadi;
+ private TextBox txtKullaniciAdi;
+ private ContextMenuStrip contextMenuStrip1;
+ private TextBox txtParola;
+ private TextBox txtParolatekrar;
+ private Button btnEkle;
+ private Button btnVazgec;
+ private TextBox txtEposta;
+ private Label label6;
+ private TextBox txtCeptel;
+ private Label label7;
+ }
+}
\ No newline at end of file
diff --git a/FrmAddKullanici.cs b/FrmAddKullanici.cs
new file mode 100644
index 0000000..4ea9527
--- /dev/null
+++ b/FrmAddKullanici.cs
@@ -0,0 +1,57 @@
+using DugunSalonu.Models;
+using System.Threading.Tasks;
+
+namespace DugunSalonu
+{
+ public partial class FrmAddKullanici : Form
+ {
+ public FrmAddKullanici()
+ {
+ InitializeComponent();
+ }
+
+ private async void btnEkle_Click(object sender, EventArgs e)
+ {
+ if (txtParola.Text != txtParolatekrar.Text)
+ {
+ MessageBox.Show("Parolalar eÅŸleÅŸmiyor.", "Hata");
+ return;
+ }
+ using (dugunsalonuContext db = new dugunsalonuContext())
+ {
+ await db.kullanici.AddAsync(new Kullanici
+ {
+ Adi = txtAdi.Text,
+ Soyadi = txtSoyadi.Text,
+ KullaniciAdi = txtKullaniciAdi.Text,
+ Parola = txtParola.Text,
+ Aktif = true,
+ Admin = false,
+ CepTel = txtCeptel.Text,
+ Eposta = txtEposta.Text
+ });
+ await db.SaveChangesAsync();
+ FormTemizle();
+ MessageBox.Show("İşlem başarılı", "Ekleme");
+
+ }
+
+ }
+
+ private void btnVazgec_Click(object sender, EventArgs e)
+ {
+ Application.Exit();
+ }
+
+ private void FormTemizle()
+ {
+ foreach (TextBox item in this.Controls)
+ {
+ if (item is TextBox)
+ {
+ item.Clear();
+ }
+ }
+ }
+ }
+}
diff --git a/Form1.resx b/FrmAddKullanici.resx
similarity index 100%
rename from Form1.resx
rename to FrmAddKullanici.resx
diff --git a/FrmLogin.Designer.cs b/FrmLogin.Designer.cs
new file mode 100644
index 0000000..7fd051f
--- /dev/null
+++ b/FrmLogin.Designer.cs
@@ -0,0 +1,138 @@
+namespace DugunSalonu
+{
+ partial class FrmLogin
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ btnGiris = new Button();
+ btnVazgec = new Button();
+ txtKullanici = new TextBox();
+ txtSifre = new TextBox();
+ label1 = new Label();
+ label2 = new Label();
+ fileSystemWatcher1 = new FileSystemWatcher();
+ ((System.ComponentModel.ISupportInitialize)fileSystemWatcher1).BeginInit();
+ SuspendLayout();
+ //
+ // btnGiris
+ //
+ btnGiris.Font = new Font("Segoe UI", 9F, FontStyle.Bold);
+ btnGiris.Location = new Point(149, 90);
+ btnGiris.Name = "btnGiris";
+ btnGiris.Size = new Size(75, 32);
+ btnGiris.TabIndex = 0;
+ btnGiris.Text = "GiriÅŸ";
+ btnGiris.UseVisualStyleBackColor = true;
+ btnGiris.Click += btnGiris_Click;
+ //
+ // btnVazgec
+ //
+ btnVazgec.Font = new Font("Segoe UI", 9F, FontStyle.Bold);
+ btnVazgec.Location = new Point(230, 90);
+ btnVazgec.Name = "btnVazgec";
+ btnVazgec.Size = new Size(75, 32);
+ btnVazgec.TabIndex = 1;
+ btnVazgec.Text = "Vazgeç";
+ btnVazgec.UseVisualStyleBackColor = true;
+ btnVazgec.Click += btnVazgec_Click;
+ //
+ // txtKullanici
+ //
+ txtKullanici.Location = new Point(135, 22);
+ txtKullanici.Name = "txtKullanici";
+ txtKullanici.Size = new Size(170, 23);
+ txtKullanici.TabIndex = 2;
+ //
+ // txtSifre
+ //
+ txtSifre.Location = new Point(135, 61);
+ txtSifre.Name = "txtSifre";
+ txtSifre.Size = new Size(170, 23);
+ txtSifre.TabIndex = 3;
+ txtSifre.UseSystemPasswordChar = true;
+ //
+ // label1
+ //
+ label1.AutoSize = true;
+ label1.BackColor = SystemColors.ActiveCaption;
+ label1.Font = new Font("Segoe UI", 9F, FontStyle.Bold);
+ label1.Location = new Point(56, 25);
+ label1.Name = "label1";
+ label1.Size = new Size(74, 15);
+ label1.TabIndex = 4;
+ label1.Text = "Kullanıcı Adı";
+ //
+ // label2
+ //
+ label2.AutoSize = true;
+ label2.BackColor = SystemColors.ActiveCaption;
+ label2.Font = new Font("Segoe UI", 9F, FontStyle.Bold);
+ label2.Location = new Point(99, 64);
+ label2.Name = "label2";
+ label2.Size = new Size(34, 15);
+ label2.TabIndex = 5;
+ label2.Text = "Åžifre";
+ //
+ // fileSystemWatcher1
+ //
+ fileSystemWatcher1.EnableRaisingEvents = true;
+ fileSystemWatcher1.SynchronizingObject = this;
+ //
+ // FrmLogin
+ //
+ AcceptButton = btnGiris;
+ AutoScaleDimensions = new SizeF(7F, 15F);
+ AutoScaleMode = AutoScaleMode.Font;
+ BackColor = SystemColors.ActiveCaption;
+ CancelButton = btnVazgec;
+ ClientSize = new Size(316, 134);
+ Controls.Add(label2);
+ Controls.Add(label1);
+ Controls.Add(txtSifre);
+ Controls.Add(txtKullanici);
+ Controls.Add(btnVazgec);
+ Controls.Add(btnGiris);
+ FormBorderStyle = FormBorderStyle.Fixed3D;
+ Name = "FrmLogin";
+ Text = "Login";
+ Load += FrmLogin_Load;
+ ((System.ComponentModel.ISupportInitialize)fileSystemWatcher1).EndInit();
+ ResumeLayout(false);
+ PerformLayout();
+ }
+
+ #endregion
+
+ private Button btnGiris;
+ private Button btnVazgec;
+ private TextBox txtKullanici;
+ private TextBox txtSifre;
+ private Label label1;
+ private Label label2;
+ private FileSystemWatcher fileSystemWatcher1;
+ }
+}
diff --git a/FrmLogin.cs b/FrmLogin.cs
new file mode 100644
index 0000000..b6a29cb
--- /dev/null
+++ b/FrmLogin.cs
@@ -0,0 +1,53 @@
+using DugunSalonu.Models;
+using Microsoft.EntityFrameworkCore;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using System.Buffers;
+
+namespace DugunSalonu
+{
+ public partial class FrmLogin : Form
+ {
+ public FrmLogin()
+ {
+ InitializeComponent();
+ }
+
+ private void FrmLogin_Load(object sender, EventArgs e)
+ {
+
+ }
+
+ private void btnVazgec_Click(object sender, EventArgs e)
+ {
+ Application.Exit();
+ }
+
+ private async void btnGiris_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ using (dugunsalonuContext db = new dugunsalonuContext())
+ {
+ var user = await db.kullanici.Where(k => k.KullaniciAdi == txtKullanici.Text && k.Aktif == true && k.Parola == txtSifre.Text).FirstOrDefaultAsync();
+ if (user != null)
+ {
+ FrmAddKullanici f1 = new FrmAddKullanici();
+ f1.Show();
+ this.Hide();
+ }
+ else { MessageBox.Show("Hatalý kullanýcý bilgileri.","Hata"); }
+ //Kullanici girisKullanicisi = await db.Kullanici.Where(k => k.KullaniciAdi == txtKullanici.Text && k.Parola == txtSifre.Text).FirstOrDefaultAsync();
+ }
+ }
+ catch (Exception)
+ {
+
+ throw;
+ }
+ }
+ }
+}
+
+
+
diff --git a/FrmLogin.resx b/FrmLogin.resx
new file mode 100644
index 0000000..12c3542
--- /dev/null
+++ b/FrmLogin.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/Migrations/20250802214445_dugunsalonuContex.cs.Designer.cs b/Migrations/20250802214445_dugunsalonuContex.cs.Designer.cs
new file mode 100644
index 0000000..33961fe
--- /dev/null
+++ b/Migrations/20250802214445_dugunsalonuContex.cs.Designer.cs
@@ -0,0 +1,74 @@
+//
+using DugunSalonu.Models;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace DugunSalonu.Migrations
+{
+ [DbContext(typeof(dugunsalonuContext))]
+ [Migration("20250802214445_dugunsalonuContex.cs")]
+ partial class dugunsalonuContexcs
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.7")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("DugunSalonu.Models.Kullanici", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Adi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Admin")
+ .HasColumnType("boolean");
+
+ b.Property("Aktif")
+ .HasColumnType("boolean");
+
+ b.Property("CepTel")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)");
+
+ b.Property("Eposta")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("KullaniciAdi")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)");
+
+ b.Property("Parola")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Soyadi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("Kullanici");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Migrations/20250802214445_dugunsalonuContex.cs.cs b/Migrations/20250802214445_dugunsalonuContex.cs.cs
new file mode 100644
index 0000000..ada657a
--- /dev/null
+++ b/Migrations/20250802214445_dugunsalonuContex.cs.cs
@@ -0,0 +1,42 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace DugunSalonu.Migrations
+{
+ ///
+ public partial class dugunsalonuContexcs : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "Kullanici",
+ columns: table => new
+ {
+ Id = table.Column(type: "integer", nullable: false)
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+ KullaniciAdi = table.Column(type: "character varying(50)", maxLength: 50, nullable: false),
+ Adi = table.Column(type: "text", nullable: false),
+ Soyadi = table.Column(type: "text", nullable: false),
+ Parola = table.Column(type: "text", nullable: false),
+ Eposta = table.Column(type: "text", nullable: false),
+ CepTel = table.Column(type: "character varying(10)", maxLength: 10, nullable: false),
+ Aktif = table.Column(type: "boolean", nullable: false),
+ Admin = table.Column(type: "boolean", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Kullanici", x => x.Id);
+ });
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "Kullanici");
+ }
+ }
+}
diff --git a/Migrations/20250802214730_KullaniciTablosuEkle.Designer.cs b/Migrations/20250802214730_KullaniciTablosuEkle.Designer.cs
new file mode 100644
index 0000000..e200d3f
--- /dev/null
+++ b/Migrations/20250802214730_KullaniciTablosuEkle.Designer.cs
@@ -0,0 +1,74 @@
+//
+using DugunSalonu.Models;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace DugunSalonu.Migrations
+{
+ [DbContext(typeof(dugunsalonuContext))]
+ [Migration("20250802214730_KullaniciTablosuEkle")]
+ partial class KullaniciTablosuEkle
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.7")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("DugunSalonu.Models.Kullanici", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Adi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Admin")
+ .HasColumnType("boolean");
+
+ b.Property("Aktif")
+ .HasColumnType("boolean");
+
+ b.Property("CepTel")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)");
+
+ b.Property("Eposta")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("KullaniciAdi")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)");
+
+ b.Property("Parola")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Soyadi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("Kullanici");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Migrations/20250802214730_KullaniciTablosuEkle.cs b/Migrations/20250802214730_KullaniciTablosuEkle.cs
new file mode 100644
index 0000000..b3d8347
--- /dev/null
+++ b/Migrations/20250802214730_KullaniciTablosuEkle.cs
@@ -0,0 +1,22 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace DugunSalonu.Migrations
+{
+ ///
+ public partial class KullaniciTablosuEkle : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+
+ }
+ }
+}
diff --git a/Migrations/20250807211734_mig2.Designer.cs b/Migrations/20250807211734_mig2.Designer.cs
new file mode 100644
index 0000000..c31ea60
--- /dev/null
+++ b/Migrations/20250807211734_mig2.Designer.cs
@@ -0,0 +1,130 @@
+//
+using DugunSalonu.Models;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace DugunSalonu.Migrations
+{
+ [DbContext(typeof(dugunsalonuContext))]
+ [Migration("20250807211734_mig2")]
+ partial class mig2
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.7")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("DugunSalonu.Models.Kullanici", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Adi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Admin")
+ .HasColumnType("boolean");
+
+ b.Property("Aktif")
+ .HasColumnType("boolean");
+
+ b.Property("CepTel")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)");
+
+ b.Property("Eposta")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("KullaniciAdi")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)");
+
+ b.Property("Parola")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Soyadi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("Kullanici");
+ });
+
+ modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("adi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("adres")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ceptel")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)");
+
+ b.Property("eposta")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("il")
+ .HasColumnType("integer");
+
+ b.Property("ilce")
+ .HasColumnType("integer");
+
+ b.Property("mail")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("telefon")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("vergidairesi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("verginumarasi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("webadres")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("salon");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Migrations/20250807211734_mig2.cs b/Migrations/20250807211734_mig2.cs
new file mode 100644
index 0000000..ab637e4
--- /dev/null
+++ b/Migrations/20250807211734_mig2.cs
@@ -0,0 +1,45 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace DugunSalonu.Migrations
+{
+ ///
+ public partial class mig2 : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "salon",
+ columns: table => new
+ {
+ Id = table.Column(type: "integer", nullable: false)
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+ adi = table.Column(type: "text", nullable: false),
+ adres = table.Column(type: "text", nullable: false),
+ il = table.Column(type: "integer", nullable: false),
+ ilce = table.Column(type: "integer", nullable: false),
+ eposta = table.Column(type: "text", nullable: false),
+ vergidairesi = table.Column(type: "text", nullable: false),
+ verginumarasi = table.Column(type: "text", nullable: false),
+ telefon = table.Column(type: "text", nullable: false),
+ ceptel = table.Column(type: "character varying(10)", maxLength: 10, nullable: false),
+ mail = table.Column(type: "text", nullable: false),
+ webadres = table.Column(type: "text", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_salon", x => x.Id);
+ });
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "salon");
+ }
+ }
+}
diff --git a/Migrations/20250807212423_mg3.Designer.cs b/Migrations/20250807212423_mg3.Designer.cs
new file mode 100644
index 0000000..42d96da
--- /dev/null
+++ b/Migrations/20250807212423_mg3.Designer.cs
@@ -0,0 +1,130 @@
+//
+using DugunSalonu.Models;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace DugunSalonu.Migrations
+{
+ [DbContext(typeof(dugunsalonuContext))]
+ [Migration("20250807212423_mg3")]
+ partial class mg3
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.7")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("DugunSalonu.Models.Kullanici", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Adi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Admin")
+ .HasColumnType("boolean");
+
+ b.Property("Aktif")
+ .HasColumnType("boolean");
+
+ b.Property("CepTel")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)");
+
+ b.Property("Eposta")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("KullaniciAdi")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)");
+
+ b.Property("Parola")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Soyadi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("kullanici");
+ });
+
+ modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("adi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("adres")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ceptel")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)");
+
+ b.Property("eposta")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("il")
+ .HasColumnType("integer");
+
+ b.Property("ilce")
+ .HasColumnType("integer");
+
+ b.Property("mail")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("telefon")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("vergidairesi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("verginumarasi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("webadres")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("salon");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Migrations/20250807212423_mg3.cs b/Migrations/20250807212423_mg3.cs
new file mode 100644
index 0000000..1961491
--- /dev/null
+++ b/Migrations/20250807212423_mg3.cs
@@ -0,0 +1,44 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace DugunSalonu.Migrations
+{
+ ///
+ public partial class mg3 : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropPrimaryKey(
+ name: "PK_Kullanici",
+ table: "Kullanici");
+
+ migrationBuilder.RenameTable(
+ name: "Kullanici",
+ newName: "kullanici");
+
+ migrationBuilder.AddPrimaryKey(
+ name: "PK_kullanici",
+ table: "kullanici",
+ column: "Id");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropPrimaryKey(
+ name: "PK_kullanici",
+ table: "kullanici");
+
+ migrationBuilder.RenameTable(
+ name: "kullanici",
+ newName: "Kullanici");
+
+ migrationBuilder.AddPrimaryKey(
+ name: "PK_Kullanici",
+ table: "Kullanici",
+ column: "Id");
+ }
+ }
+}
diff --git a/Migrations/20250807212616_mg4.Designer.cs b/Migrations/20250807212616_mg4.Designer.cs
new file mode 100644
index 0000000..722fe57
--- /dev/null
+++ b/Migrations/20250807212616_mg4.Designer.cs
@@ -0,0 +1,130 @@
+//
+using DugunSalonu.Models;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace DugunSalonu.Migrations
+{
+ [DbContext(typeof(dugunsalonuContext))]
+ [Migration("20250807212616_mg4")]
+ partial class mg4
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.7")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("DugunSalonu.Models.Kullanici", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Adi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Admin")
+ .HasColumnType("boolean");
+
+ b.Property("Aktif")
+ .HasColumnType("boolean");
+
+ b.Property("CepTel")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)");
+
+ b.Property("Eposta")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("KullaniciAdi")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)");
+
+ b.Property("Parola")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Soyadi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("kullanici");
+ });
+
+ modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("adi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("adres")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ceptel")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)");
+
+ b.Property("eposta")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("il")
+ .HasColumnType("integer");
+
+ b.Property("ilce")
+ .HasColumnType("integer");
+
+ b.Property("mail")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("telefon")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("vergidairesi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("verginumarasi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("webadres")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("salon");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Migrations/20250807212616_mg4.cs b/Migrations/20250807212616_mg4.cs
new file mode 100644
index 0000000..2c18adf
--- /dev/null
+++ b/Migrations/20250807212616_mg4.cs
@@ -0,0 +1,22 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace DugunSalonu.Migrations
+{
+ ///
+ public partial class mg4 : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+
+ }
+ }
+}
diff --git a/Migrations/20250807213526_mg5.Designer.cs b/Migrations/20250807213526_mg5.Designer.cs
new file mode 100644
index 0000000..8ba319b
--- /dev/null
+++ b/Migrations/20250807213526_mg5.Designer.cs
@@ -0,0 +1,160 @@
+//
+using DugunSalonu.Models;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace DugunSalonu.Migrations
+{
+ [DbContext(typeof(dugunsalonuContext))]
+ [Migration("20250807213526_mg5")]
+ partial class mg5
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.7")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("DugunSalonu.Models.Il", b =>
+ {
+ b.Property("id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("id"));
+
+ b.Property("adi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("id");
+
+ b.ToTable("il");
+ });
+
+ modelBuilder.Entity("DugunSalonu.Models.Kullanici", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Adi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Admin")
+ .HasColumnType("boolean");
+
+ b.Property("Aktif")
+ .HasColumnType("boolean");
+
+ b.Property("CepTel")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)");
+
+ b.Property("Eposta")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("KullaniciAdi")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)");
+
+ b.Property("Parola")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Soyadi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("kullanici");
+ });
+
+ modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("IlId")
+ .HasColumnType("integer");
+
+ b.Property("adi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("adres")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ceptel")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)");
+
+ b.Property("eposta")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ilce")
+ .HasColumnType("integer");
+
+ b.Property("mail")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("telefon")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("vergidairesi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("verginumarasi")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("webadres")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("IlId");
+
+ b.ToTable("salon");
+ });
+
+ modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
+ {
+ b.HasOne("DugunSalonu.Models.Il", "il")
+ .WithMany()
+ .HasForeignKey("IlId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("il");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Migrations/20250807213526_mg5.cs b/Migrations/20250807213526_mg5.cs
new file mode 100644
index 0000000..df071d4
--- /dev/null
+++ b/Migrations/20250807213526_mg5.cs
@@ -0,0 +1,66 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace DugunSalonu.Migrations
+{
+ ///
+ public partial class mg5 : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.RenameColumn(
+ name: "il",
+ table: "salon",
+ newName: "IlId");
+
+ migrationBuilder.CreateTable(
+ name: "il",
+ columns: table => new
+ {
+ id = table.Column(type: "integer", nullable: false)
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+ adi = table.Column(type: "text", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_il", x => x.id);
+ });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_salon_IlId",
+ table: "salon",
+ column: "IlId");
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_salon_il_IlId",
+ table: "salon",
+ column: "IlId",
+ principalTable: "il",
+ principalColumn: "id",
+ onDelete: ReferentialAction.Cascade);
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_salon_il_IlId",
+ table: "salon");
+
+ migrationBuilder.DropTable(
+ name: "il");
+
+ migrationBuilder.DropIndex(
+ name: "IX_salon_IlId",
+ table: "salon");
+
+ migrationBuilder.RenameColumn(
+ name: "IlId",
+ table: "salon",
+ newName: "il");
+ }
+ }
+}
diff --git a/Migrations/20250808092203_mig6.Designer.cs b/Migrations/20250808092203_mig6.Designer.cs
new file mode 100644
index 0000000..6d0e88e
--- /dev/null
+++ b/Migrations/20250808092203_mig6.Designer.cs
@@ -0,0 +1,179 @@
+//
+using DugunSalonu.Models;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace DugunSalonu.Migrations
+{
+ [DbContext(typeof(dugunsalonuContext))]
+ [Migration("20250808092203_mig6")]
+ partial class mig6
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.7")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("DugunSalonu.Models.Il", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("ıd");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Adi")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("adi");
+
+ b.HasKey("Id");
+
+ b.ToTable("il");
+ });
+
+ modelBuilder.Entity("DugunSalonu.Models.Kullanici", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("ıd");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Adi")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("adi");
+
+ b.Property("Admin")
+ .HasColumnType("boolean")
+ .HasColumnName("admin");
+
+ b.Property("Aktif")
+ .HasColumnType("boolean")
+ .HasColumnName("aktif");
+
+ b.Property("CepTel")
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)")
+ .HasColumnName("ceptel");
+
+ b.Property("Eposta")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("eposta");
+
+ b.Property("KullaniciAdi")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("kullaniciadi");
+
+ b.Property("Parola")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("parola");
+
+ b.Property("Soyadi")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("soyadi");
+
+ b.HasKey("Id");
+
+ b.ToTable("kullanici");
+ });
+
+ modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("ıd");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Adi")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("adi");
+
+ b.Property("Adres")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("adres");
+
+ b.Property("CepTel")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)")
+ .HasColumnName("ceptel");
+
+ b.Property("Eposta")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("eposta");
+
+ b.Property("IlId")
+ .HasColumnType("integer")
+ .HasColumnName("ılıd");
+
+ b.Property("Ilce")
+ .HasColumnType("integer")
+ .HasColumnName("ılce");
+
+ b.Property("Telefon")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("telefon");
+
+ b.Property("VergiDairesi")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("vergidairesi");
+
+ b.Property("VergiNumarasi")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("verginumarasi");
+
+ b.Property("WebAdres")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("webadres");
+
+ b.HasKey("Id");
+
+ b.HasIndex("IlId");
+
+ b.ToTable("salon");
+ });
+
+ modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
+ {
+ b.HasOne("DugunSalonu.Models.Il", "il")
+ .WithMany()
+ .HasForeignKey("IlId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("il");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Migrations/20250808092203_mig6.cs b/Migrations/20250808092203_mig6.cs
new file mode 100644
index 0000000..7a50790
--- /dev/null
+++ b/Migrations/20250808092203_mig6.cs
@@ -0,0 +1,271 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace DugunSalonu.Migrations
+{
+ ///
+ public partial class mig6 : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_salon_il_IlId",
+ table: "salon");
+
+ migrationBuilder.DropColumn(
+ name: "mail",
+ table: "salon");
+
+ migrationBuilder.RenameColumn(
+ name: "ilce",
+ table: "salon",
+ newName: "ılce");
+
+ migrationBuilder.RenameColumn(
+ name: "IlId",
+ table: "salon",
+ newName: "ılıd");
+
+ migrationBuilder.RenameColumn(
+ name: "Id",
+ table: "salon",
+ newName: "ıd");
+
+ migrationBuilder.RenameIndex(
+ name: "IX_salon_IlId",
+ table: "salon",
+ newName: "IX_salon_ılıd");
+
+ migrationBuilder.RenameColumn(
+ name: "Soyadi",
+ table: "kullanici",
+ newName: "soyadi");
+
+ migrationBuilder.RenameColumn(
+ name: "Parola",
+ table: "kullanici",
+ newName: "parola");
+
+ migrationBuilder.RenameColumn(
+ name: "KullaniciAdi",
+ table: "kullanici",
+ newName: "kullaniciadi");
+
+ migrationBuilder.RenameColumn(
+ name: "Eposta",
+ table: "kullanici",
+ newName: "eposta");
+
+ migrationBuilder.RenameColumn(
+ name: "CepTel",
+ table: "kullanici",
+ newName: "ceptel");
+
+ migrationBuilder.RenameColumn(
+ name: "Aktif",
+ table: "kullanici",
+ newName: "aktif");
+
+ migrationBuilder.RenameColumn(
+ name: "Admin",
+ table: "kullanici",
+ newName: "admin");
+
+ migrationBuilder.RenameColumn(
+ name: "Adi",
+ table: "kullanici",
+ newName: "adi");
+
+ migrationBuilder.RenameColumn(
+ name: "Id",
+ table: "kullanici",
+ newName: "ıd");
+
+ migrationBuilder.RenameColumn(
+ name: "id",
+ table: "il",
+ newName: "ıd");
+
+ migrationBuilder.AlterColumn(
+ name: "soyadi",
+ table: "kullanici",
+ type: "character varying(50)",
+ maxLength: 50,
+ nullable: false,
+ oldClrType: typeof(string),
+ oldType: "text");
+
+ migrationBuilder.AlterColumn(
+ name: "eposta",
+ table: "kullanici",
+ type: "character varying(50)",
+ maxLength: 50,
+ nullable: true,
+ oldClrType: typeof(string),
+ oldType: "text");
+
+ migrationBuilder.AlterColumn(
+ name: "ceptel",
+ table: "kullanici",
+ type: "character varying(10)",
+ maxLength: 10,
+ nullable: true,
+ oldClrType: typeof(string),
+ oldType: "character varying(10)",
+ oldMaxLength: 10);
+
+ migrationBuilder.AlterColumn(
+ name: "adi",
+ table: "kullanici",
+ type: "character varying(50)",
+ maxLength: 50,
+ nullable: false,
+ oldClrType: typeof(string),
+ oldType: "text");
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_salon_il_ılıd",
+ table: "salon",
+ column: "ılıd",
+ principalTable: "il",
+ principalColumn: "ıd",
+ onDelete: ReferentialAction.Cascade);
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_salon_il_ılıd",
+ table: "salon");
+
+ migrationBuilder.RenameColumn(
+ name: "ılıd",
+ table: "salon",
+ newName: "IlId");
+
+ migrationBuilder.RenameColumn(
+ name: "ılce",
+ table: "salon",
+ newName: "ilce");
+
+ migrationBuilder.RenameColumn(
+ name: "ıd",
+ table: "salon",
+ newName: "Id");
+
+ migrationBuilder.RenameIndex(
+ name: "IX_salon_ılıd",
+ table: "salon",
+ newName: "IX_salon_IlId");
+
+ migrationBuilder.RenameColumn(
+ name: "soyadi",
+ table: "kullanici",
+ newName: "Soyadi");
+
+ migrationBuilder.RenameColumn(
+ name: "parola",
+ table: "kullanici",
+ newName: "Parola");
+
+ migrationBuilder.RenameColumn(
+ name: "kullaniciadi",
+ table: "kullanici",
+ newName: "KullaniciAdi");
+
+ migrationBuilder.RenameColumn(
+ name: "eposta",
+ table: "kullanici",
+ newName: "Eposta");
+
+ migrationBuilder.RenameColumn(
+ name: "ceptel",
+ table: "kullanici",
+ newName: "CepTel");
+
+ migrationBuilder.RenameColumn(
+ name: "aktif",
+ table: "kullanici",
+ newName: "Aktif");
+
+ migrationBuilder.RenameColumn(
+ name: "admin",
+ table: "kullanici",
+ newName: "Admin");
+
+ migrationBuilder.RenameColumn(
+ name: "adi",
+ table: "kullanici",
+ newName: "Adi");
+
+ migrationBuilder.RenameColumn(
+ name: "ıd",
+ table: "kullanici",
+ newName: "Id");
+
+ migrationBuilder.RenameColumn(
+ name: "ıd",
+ table: "il",
+ newName: "id");
+
+ migrationBuilder.AddColumn(
+ name: "mail",
+ table: "salon",
+ type: "text",
+ nullable: false,
+ defaultValue: "");
+
+ migrationBuilder.AlterColumn(
+ name: "Soyadi",
+ table: "kullanici",
+ type: "text",
+ nullable: false,
+ oldClrType: typeof(string),
+ oldType: "character varying(50)",
+ oldMaxLength: 50);
+
+ migrationBuilder.AlterColumn(
+ name: "Eposta",
+ table: "kullanici",
+ type: "text",
+ nullable: false,
+ defaultValue: "",
+ oldClrType: typeof(string),
+ oldType: "character varying(50)",
+ oldMaxLength: 50,
+ oldNullable: true);
+
+ migrationBuilder.AlterColumn(
+ name: "CepTel",
+ table: "kullanici",
+ type: "character varying(10)",
+ maxLength: 10,
+ nullable: false,
+ defaultValue: "",
+ oldClrType: typeof(string),
+ oldType: "character varying(10)",
+ oldMaxLength: 10,
+ oldNullable: true);
+
+ migrationBuilder.AlterColumn(
+ name: "Adi",
+ table: "kullanici",
+ type: "text",
+ nullable: false,
+ oldClrType: typeof(string),
+ oldType: "character varying(50)",
+ oldMaxLength: 50);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_salon_il_IlId",
+ table: "salon",
+ column: "IlId",
+ principalTable: "il",
+ principalColumn: "id",
+ onDelete: ReferentialAction.Cascade);
+ }
+ }
+}
diff --git a/Migrations/dugunsalonuContextModelSnapshot.cs b/Migrations/dugunsalonuContextModelSnapshot.cs
new file mode 100644
index 0000000..235fa9c
--- /dev/null
+++ b/Migrations/dugunsalonuContextModelSnapshot.cs
@@ -0,0 +1,176 @@
+//
+using DugunSalonu.Models;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace DugunSalonu.Migrations
+{
+ [DbContext(typeof(dugunsalonuContext))]
+ partial class dugunsalonuContextModelSnapshot : ModelSnapshot
+ {
+ protected override void BuildModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.7")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("DugunSalonu.Models.Il", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("ıd");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Adi")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("adi");
+
+ b.HasKey("Id");
+
+ b.ToTable("il");
+ });
+
+ modelBuilder.Entity("DugunSalonu.Models.Kullanici", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("ıd");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Adi")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("adi");
+
+ b.Property("Admin")
+ .HasColumnType("boolean")
+ .HasColumnName("admin");
+
+ b.Property("Aktif")
+ .HasColumnType("boolean")
+ .HasColumnName("aktif");
+
+ b.Property("CepTel")
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)")
+ .HasColumnName("ceptel");
+
+ b.Property("Eposta")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("eposta");
+
+ b.Property("KullaniciAdi")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("kullaniciadi");
+
+ b.Property("Parola")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("parola");
+
+ b.Property("Soyadi")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("soyadi");
+
+ b.HasKey("Id");
+
+ b.ToTable("kullanici");
+ });
+
+ modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("ıd");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Adi")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("adi");
+
+ b.Property("Adres")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("adres");
+
+ b.Property("CepTel")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)")
+ .HasColumnName("ceptel");
+
+ b.Property("Eposta")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("eposta");
+
+ b.Property("IlId")
+ .HasColumnType("integer")
+ .HasColumnName("ılıd");
+
+ b.Property("Ilce")
+ .HasColumnType("integer")
+ .HasColumnName("ılce");
+
+ b.Property("Telefon")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("telefon");
+
+ b.Property("VergiDairesi")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("vergidairesi");
+
+ b.Property("VergiNumarasi")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("verginumarasi");
+
+ b.Property("WebAdres")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("webadres");
+
+ b.HasKey("Id");
+
+ b.HasIndex("IlId");
+
+ b.ToTable("salon");
+ });
+
+ modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
+ {
+ b.HasOne("DugunSalonu.Models.Il", "il")
+ .WithMany()
+ .HasForeignKey("IlId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("il");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Models/Il.cs b/Models/Il.cs
new file mode 100644
index 0000000..4ab9102
--- /dev/null
+++ b/Models/Il.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DugunSalonu.Models
+{
+ public class Il
+
+ {
+ public Il()
+ {
+ salons = new HashSet();
+ }
+ [Key]
+ public int Id { get; set; }
+ public string Adi { get; set; }
+
+ ICollection? salons { get; set; }
+ }
+}
diff --git a/Models/Kullanici.cs b/Models/Kullanici.cs
new file mode 100644
index 0000000..02b3e5a
--- /dev/null
+++ b/Models/Kullanici.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DugunSalonu.Models
+{
+ internal class Kullanici
+ {
+ [Key]
+ public int Id { get; set; }
+ [MaxLength(50), MinLength(5)]
+ [Required]
+
+ public required string KullaniciAdi { get; set; }
+ [Required]
+ [MaxLength(50)]
+ public required string Adi { get; set; }
+ [Required]
+ [MaxLength(50)]
+ public required string Soyadi { get; set; }
+
+ public string AdiSoyadi { get { return $"{Adi} {Soyadi}"; } }
+ [Required]
+ public required string Parola { get; set; }
+ [MaxLength(50)]
+ public string? Eposta { get; set; }
+
+ [MaxLength(10), MinLength(10)]
+ public string? CepTel { get; set; }
+ public bool Aktif { get; set; }
+ public bool Admin { get; set; }
+ }
+}
diff --git a/Models/Salon.cs b/Models/Salon.cs
new file mode 100644
index 0000000..e8ef94c
--- /dev/null
+++ b/Models/Salon.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DugunSalonu.Models
+{
+ public class Salon
+ {
+ [Key]
+ public int Id { get; set; }
+ public string Adi { get; set; }
+ public string Adres { get; set; }
+ public int IlId { get; set; }
+ public int Ilce { get; set; }
+ public string Eposta { get; set; }
+ public string VergiDairesi { get; set; }
+ public string VergiNumarasi { get; set; }
+ public string Telefon { get; set; }
+
+ [MaxLength(10), MinLength(10)]
+ public string CepTel { get; set; }
+ public string WebAdres { get; set; }
+
+ public Il? il { get; set; }
+ }
+}
diff --git a/Models/dugunsalonuContext.cs b/Models/dugunsalonuContext.cs
new file mode 100644
index 0000000..da41005
--- /dev/null
+++ b/Models/dugunsalonuContext.cs
@@ -0,0 +1,43 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DugunSalonu.Models
+{
+ internal class dugunsalonuContext:DbContext
+ {
+ public DbSet kullanici { get; set; }
+
+ public DbSet salon { get; set; }
+ public DbSet il { get; set; }
+
+
+ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
+ {
+ optionsBuilder.UseNpgsql("Server=edoysoft.com;Database=DugunSalonu;User Id=postgres;Password=MgC1453MgC;", b => b.EnableRetryOnFailure());
+ base.OnConfiguring(optionsBuilder);
+ }
+
+ protected override void OnModelCreating(ModelBuilder modelBuilder)
+ {
+ base.OnModelCreating(modelBuilder);
+
+ foreach (var entityType in modelBuilder.Model.GetEntityTypes())
+ {
+ // Sütun isimlerini büyük harfe dönüştür
+ foreach (var property in entityType.GetProperties())
+ {
+ var columnName = property.GetColumnName(StoreObjectIdentifier.Table(entityType.GetTableName(), entityType.GetSchema()));
+ // property.SetColumnName(Encoding.ASCII.GetString(columnName.ToLower()));
+ }
+
+ // İsteğe bağlı: Tablo isimlerini de büyük harfe dönüştür (eğer istiyorsanız)
+ entityType.SetTableName(entityType.GetTableName().ToLower());
+ }
+ }
+ }
+}
diff --git a/Program.cs b/Program.cs
index 9893f68..822d991 100644
--- a/Program.cs
+++ b/Program.cs
@@ -11,7 +11,7 @@ namespace DugunSalonu
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
- Application.Run(new Form1());
+ Application.Run(new FrmLogin());
}
}
}
\ No newline at end of file