aaa
This commit is contained in:
@@ -8,4 +8,30 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Bunifu.UI.WinForms" Version="9.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.7" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.7">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Migrations\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="FrmAddKullanici.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Update="FrmAddKullanici.resx">
|
||||||
|
<Generator></Generator>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
45
Form1.Designer.cs
generated
45
Form1.Designer.cs
generated
@@ -1,45 +0,0 @@
|
|||||||
namespace DugunSalonu
|
|
||||||
{
|
|
||||||
partial class Form1
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
10
Form1.cs
10
Form1.cs
@@ -1,10 +0,0 @@
|
|||||||
namespace DugunSalonu
|
|
||||||
{
|
|
||||||
public partial class Form1 : Form
|
|
||||||
{
|
|
||||||
public Form1()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
247
FrmAddKullanici.Designer.cs
generated
Normal file
247
FrmAddKullanici.Designer.cs
generated
Normal file
@@ -0,0 +1,247 @@
|
|||||||
|
namespace DugunSalonu
|
||||||
|
{
|
||||||
|
partial class FrmAddKullanici
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
57
FrmAddKullanici.cs
Normal file
57
FrmAddKullanici.cs
Normal file
@@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
138
FrmLogin.Designer.cs
generated
Normal file
138
FrmLogin.Designer.cs
generated
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
namespace DugunSalonu
|
||||||
|
{
|
||||||
|
partial class FrmLogin
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
53
FrmLogin.cs
Normal file
53
FrmLogin.cs
Normal file
@@ -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<61> kullan<61>c<EFBFBD> bilgileri.","Hata"); }
|
||||||
|
//Kullanici girisKullanicisi = await db.Kullanici.Where(k => k.KullaniciAdi == txtKullanici.Text && k.Parola == txtSifre.Text).FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
123
FrmLogin.resx
Normal file
123
FrmLogin.resx
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="fileSystemWatcher1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
74
Migrations/20250802214445_dugunsalonuContex.cs.Designer.cs
generated
Normal file
74
Migrations/20250802214445_dugunsalonuContex.cs.Designer.cs
generated
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
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
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
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<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("Admin")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("Aktif")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("CepTel")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character varying(10)");
|
||||||
|
|
||||||
|
b.Property<string>("Eposta")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("KullaniciAdi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)");
|
||||||
|
|
||||||
|
b.Property<string>("Parola")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Soyadi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Kullanici");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
42
Migrations/20250802214445_dugunsalonuContex.cs.cs
Normal file
42
Migrations/20250802214445_dugunsalonuContex.cs.cs
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace DugunSalonu.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class dugunsalonuContexcs : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Kullanici",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(type: "integer", nullable: false)
|
||||||
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
|
KullaniciAdi = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
|
||||||
|
Adi = table.Column<string>(type: "text", nullable: false),
|
||||||
|
Soyadi = table.Column<string>(type: "text", nullable: false),
|
||||||
|
Parola = table.Column<string>(type: "text", nullable: false),
|
||||||
|
Eposta = table.Column<string>(type: "text", nullable: false),
|
||||||
|
CepTel = table.Column<string>(type: "character varying(10)", maxLength: 10, nullable: false),
|
||||||
|
Aktif = table.Column<bool>(type: "boolean", nullable: false),
|
||||||
|
Admin = table.Column<bool>(type: "boolean", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Kullanici", x => x.Id);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Kullanici");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
74
Migrations/20250802214730_KullaniciTablosuEkle.Designer.cs
generated
Normal file
74
Migrations/20250802214730_KullaniciTablosuEkle.Designer.cs
generated
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
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
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
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<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("Admin")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("Aktif")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("CepTel")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character varying(10)");
|
||||||
|
|
||||||
|
b.Property<string>("Eposta")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("KullaniciAdi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)");
|
||||||
|
|
||||||
|
b.Property<string>("Parola")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Soyadi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Kullanici");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
22
Migrations/20250802214730_KullaniciTablosuEkle.cs
Normal file
22
Migrations/20250802214730_KullaniciTablosuEkle.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace DugunSalonu.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class KullaniciTablosuEkle : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
130
Migrations/20250807211734_mig2.Designer.cs
generated
Normal file
130
Migrations/20250807211734_mig2.Designer.cs
generated
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
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
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
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<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("Admin")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("Aktif")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("CepTel")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character varying(10)");
|
||||||
|
|
||||||
|
b.Property<string>("Eposta")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("KullaniciAdi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)");
|
||||||
|
|
||||||
|
b.Property<string>("Parola")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Soyadi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Kullanici");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("adres")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("ceptel")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character varying(10)");
|
||||||
|
|
||||||
|
b.Property<string>("eposta")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int>("il")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int>("ilce")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("mail")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("telefon")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("vergidairesi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("verginumarasi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("webadres")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("salon");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
45
Migrations/20250807211734_mig2.cs
Normal file
45
Migrations/20250807211734_mig2.cs
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace DugunSalonu.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class mig2 : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "salon",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(type: "integer", nullable: false)
|
||||||
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
|
adi = table.Column<string>(type: "text", nullable: false),
|
||||||
|
adres = table.Column<string>(type: "text", nullable: false),
|
||||||
|
il = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
ilce = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
eposta = table.Column<string>(type: "text", nullable: false),
|
||||||
|
vergidairesi = table.Column<string>(type: "text", nullable: false),
|
||||||
|
verginumarasi = table.Column<string>(type: "text", nullable: false),
|
||||||
|
telefon = table.Column<string>(type: "text", nullable: false),
|
||||||
|
ceptel = table.Column<string>(type: "character varying(10)", maxLength: 10, nullable: false),
|
||||||
|
mail = table.Column<string>(type: "text", nullable: false),
|
||||||
|
webadres = table.Column<string>(type: "text", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_salon", x => x.Id);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "salon");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
130
Migrations/20250807212423_mg3.Designer.cs
generated
Normal file
130
Migrations/20250807212423_mg3.Designer.cs
generated
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
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
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
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<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("Admin")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("Aktif")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("CepTel")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character varying(10)");
|
||||||
|
|
||||||
|
b.Property<string>("Eposta")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("KullaniciAdi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)");
|
||||||
|
|
||||||
|
b.Property<string>("Parola")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Soyadi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("kullanici");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("adres")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("ceptel")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character varying(10)");
|
||||||
|
|
||||||
|
b.Property<string>("eposta")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int>("il")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int>("ilce")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("mail")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("telefon")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("vergidairesi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("verginumarasi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("webadres")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("salon");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
44
Migrations/20250807212423_mg3.cs
Normal file
44
Migrations/20250807212423_mg3.cs
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace DugunSalonu.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class mg3 : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
130
Migrations/20250807212616_mg4.Designer.cs
generated
Normal file
130
Migrations/20250807212616_mg4.Designer.cs
generated
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
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
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
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<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("Admin")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("Aktif")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("CepTel")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character varying(10)");
|
||||||
|
|
||||||
|
b.Property<string>("Eposta")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("KullaniciAdi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)");
|
||||||
|
|
||||||
|
b.Property<string>("Parola")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Soyadi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("kullanici");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("adres")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("ceptel")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character varying(10)");
|
||||||
|
|
||||||
|
b.Property<string>("eposta")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int>("il")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int>("ilce")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("mail")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("telefon")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("vergidairesi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("verginumarasi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("webadres")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("salon");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
22
Migrations/20250807212616_mg4.cs
Normal file
22
Migrations/20250807212616_mg4.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace DugunSalonu.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class mg4 : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
160
Migrations/20250807213526_mg5.Designer.cs
generated
Normal file
160
Migrations/20250807213526_mg5.Designer.cs
generated
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
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
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
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<int>("id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("id"));
|
||||||
|
|
||||||
|
b.Property<string>("adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("id");
|
||||||
|
|
||||||
|
b.ToTable("il");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DugunSalonu.Models.Kullanici", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("Admin")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("Aktif")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("CepTel")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character varying(10)");
|
||||||
|
|
||||||
|
b.Property<string>("Eposta")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("KullaniciAdi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)");
|
||||||
|
|
||||||
|
b.Property<string>("Parola")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Soyadi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("kullanici");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("IlId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("adres")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("ceptel")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character varying(10)");
|
||||||
|
|
||||||
|
b.Property<string>("eposta")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int>("ilce")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("mail")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("telefon")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("vergidairesi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("verginumarasi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
66
Migrations/20250807213526_mg5.cs
Normal file
66
Migrations/20250807213526_mg5.cs
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace DugunSalonu.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class mg5 : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "il",
|
||||||
|
table: "salon",
|
||||||
|
newName: "IlId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "il",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
id = table.Column<int>(type: "integer", nullable: false)
|
||||||
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
|
adi = table.Column<string>(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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
179
Migrations/20250808092203_mig6.Designer.cs
generated
Normal file
179
Migrations/20250808092203_mig6.Designer.cs
generated
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
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
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
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<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("ıd");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("adi");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("il");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DugunSalonu.Models.Kullanici", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("ıd");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)")
|
||||||
|
.HasColumnName("adi");
|
||||||
|
|
||||||
|
b.Property<bool>("Admin")
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("admin");
|
||||||
|
|
||||||
|
b.Property<bool>("Aktif")
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("aktif");
|
||||||
|
|
||||||
|
b.Property<string>("CepTel")
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character varying(10)")
|
||||||
|
.HasColumnName("ceptel");
|
||||||
|
|
||||||
|
b.Property<string>("Eposta")
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)")
|
||||||
|
.HasColumnName("eposta");
|
||||||
|
|
||||||
|
b.Property<string>("KullaniciAdi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)")
|
||||||
|
.HasColumnName("kullaniciadi");
|
||||||
|
|
||||||
|
b.Property<string>("Parola")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("parola");
|
||||||
|
|
||||||
|
b.Property<string>("Soyadi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)")
|
||||||
|
.HasColumnName("soyadi");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("kullanici");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("ıd");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("adi");
|
||||||
|
|
||||||
|
b.Property<string>("Adres")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("adres");
|
||||||
|
|
||||||
|
b.Property<string>("CepTel")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character varying(10)")
|
||||||
|
.HasColumnName("ceptel");
|
||||||
|
|
||||||
|
b.Property<string>("Eposta")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("eposta");
|
||||||
|
|
||||||
|
b.Property<int>("IlId")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("ılıd");
|
||||||
|
|
||||||
|
b.Property<int>("Ilce")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("ılce");
|
||||||
|
|
||||||
|
b.Property<string>("Telefon")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("telefon");
|
||||||
|
|
||||||
|
b.Property<string>("VergiDairesi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("vergidairesi");
|
||||||
|
|
||||||
|
b.Property<string>("VergiNumarasi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("verginumarasi");
|
||||||
|
|
||||||
|
b.Property<string>("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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
271
Migrations/20250808092203_mig6.cs
Normal file
271
Migrations/20250808092203_mig6.cs
Normal file
@@ -0,0 +1,271 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace DugunSalonu.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class mig6 : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
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<string>(
|
||||||
|
name: "soyadi",
|
||||||
|
table: "kullanici",
|
||||||
|
type: "character varying(50)",
|
||||||
|
maxLength: 50,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "text");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "eposta",
|
||||||
|
table: "kullanici",
|
||||||
|
type: "character varying(50)",
|
||||||
|
maxLength: 50,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "text");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "ceptel",
|
||||||
|
table: "kullanici",
|
||||||
|
type: "character varying(10)",
|
||||||
|
maxLength: 10,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(10)",
|
||||||
|
oldMaxLength: 10);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
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<string>(
|
||||||
|
name: "mail",
|
||||||
|
table: "salon",
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: "");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "Soyadi",
|
||||||
|
table: "kullanici",
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(50)",
|
||||||
|
oldMaxLength: 50);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "Eposta",
|
||||||
|
table: "kullanici",
|
||||||
|
type: "text",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: "",
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(50)",
|
||||||
|
oldMaxLength: 50,
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
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<string>(
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
176
Migrations/dugunsalonuContextModelSnapshot.cs
Normal file
176
Migrations/dugunsalonuContextModelSnapshot.cs
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
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<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("ıd");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("adi");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("il");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DugunSalonu.Models.Kullanici", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("ıd");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)")
|
||||||
|
.HasColumnName("adi");
|
||||||
|
|
||||||
|
b.Property<bool>("Admin")
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("admin");
|
||||||
|
|
||||||
|
b.Property<bool>("Aktif")
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasColumnName("aktif");
|
||||||
|
|
||||||
|
b.Property<string>("CepTel")
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character varying(10)")
|
||||||
|
.HasColumnName("ceptel");
|
||||||
|
|
||||||
|
b.Property<string>("Eposta")
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)")
|
||||||
|
.HasColumnName("eposta");
|
||||||
|
|
||||||
|
b.Property<string>("KullaniciAdi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)")
|
||||||
|
.HasColumnName("kullaniciadi");
|
||||||
|
|
||||||
|
b.Property<string>("Parola")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("parola");
|
||||||
|
|
||||||
|
b.Property<string>("Soyadi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("character varying(50)")
|
||||||
|
.HasColumnName("soyadi");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("kullanici");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DugunSalonu.Models.Salon", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("ıd");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Adi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("adi");
|
||||||
|
|
||||||
|
b.Property<string>("Adres")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("adres");
|
||||||
|
|
||||||
|
b.Property<string>("CepTel")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(10)
|
||||||
|
.HasColumnType("character varying(10)")
|
||||||
|
.HasColumnName("ceptel");
|
||||||
|
|
||||||
|
b.Property<string>("Eposta")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("eposta");
|
||||||
|
|
||||||
|
b.Property<int>("IlId")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("ılıd");
|
||||||
|
|
||||||
|
b.Property<int>("Ilce")
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasColumnName("ılce");
|
||||||
|
|
||||||
|
b.Property<string>("Telefon")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("telefon");
|
||||||
|
|
||||||
|
b.Property<string>("VergiDairesi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("vergidairesi");
|
||||||
|
|
||||||
|
b.Property<string>("VergiNumarasi")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text")
|
||||||
|
.HasColumnName("verginumarasi");
|
||||||
|
|
||||||
|
b.Property<string>("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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
23
Models/Il.cs
Normal file
23
Models/Il.cs
Normal file
@@ -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<Salon>();
|
||||||
|
}
|
||||||
|
[Key]
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Adi { get; set; }
|
||||||
|
|
||||||
|
ICollection<Salon>? salons { get; set; }
|
||||||
|
}
|
||||||
|
}
|
37
Models/Kullanici.cs
Normal file
37
Models/Kullanici.cs
Normal file
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
29
Models/Salon.cs
Normal file
29
Models/Salon.cs
Normal file
@@ -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; }
|
||||||
|
}
|
||||||
|
}
|
43
Models/dugunsalonuContext.cs
Normal file
43
Models/dugunsalonuContext.cs
Normal file
@@ -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> kullanici { get; set; }
|
||||||
|
|
||||||
|
public DbSet<Salon> salon { get; set; }
|
||||||
|
public DbSet<Il> 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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -11,7 +11,7 @@ namespace DugunSalonu
|
|||||||
// To customize application configuration such as set high DPI settings or default font,
|
// To customize application configuration such as set high DPI settings or default font,
|
||||||
// see https://aka.ms/applicationconfiguration.
|
// see https://aka.ms/applicationconfiguration.
|
||||||
ApplicationConfiguration.Initialize();
|
ApplicationConfiguration.Initialize();
|
||||||
Application.Run(new Form1());
|
Application.Run(new FrmLogin());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user