├── .gitignore ├── .vs └── AcikSecim │ ├── DesignTimeBuild │ └── .dtbcache │ ├── config │ └── applicationhost.config │ ├── v15 │ ├── .suo │ └── Server │ │ └── sqlite3 │ │ ├── db.lock │ │ ├── storage.ide │ │ ├── storage.ide-shm │ │ └── storage.ide-wal │ └── v16 │ ├── .suo │ └── Server │ └── sqlite3 │ ├── db.lock │ └── storage.ide ├── AcikSecim.WebApi ├── .dockerignore ├── AcikSecim.WebApi.csproj ├── Controllers │ └── ValuesController.cs ├── Dockerfile ├── Models │ ├── AcikSecimDBContext.cs │ ├── Adaylar.cs │ ├── DTOs │ │ └── GirisDto.cs │ ├── Ilceler.cs │ ├── Kullanicilar.cs │ ├── Mahalleler.cs │ ├── Oturumlar.cs │ ├── Roller.cs │ ├── SandikDurumu.cs │ ├── Sandiklar.cs │ ├── Sehirler.cs │ ├── Sonuclar.cs │ └── Tutanaklar.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── Startup.cs ├── appsettings.Development.json ├── appsettings.json ├── bin │ └── Debug │ │ └── netcoreapp2.2 │ │ ├── AcikSecim.WebApi.deps.json │ │ ├── AcikSecim.WebApi.dll │ │ ├── AcikSecim.WebApi.pdb │ │ ├── AcikSecim.WebApi.runtimeconfig.dev.json │ │ └── AcikSecim.WebApi.runtimeconfig.json ├── db │ └── dbexport.pgsql └── obj │ ├── AcikSecim.WebApi.csproj.nuget.cache │ ├── AcikSecim.WebApi.csproj.nuget.dgspec.json │ ├── AcikSecim.WebApi.csproj.nuget.g.props │ ├── AcikSecim.WebApi.csproj.nuget.g.targets │ ├── Debug │ └── netcoreapp2.2 │ │ ├── AcikSecim.WebApi.AssemblyInfo.cs │ │ ├── AcikSecim.WebApi.AssemblyInfoInputs.cache │ │ ├── AcikSecim.WebApi.RazorAssemblyInfo.cache │ │ ├── AcikSecim.WebApi.RazorAssemblyInfo.cs │ │ ├── AcikSecim.WebApi.RazorTargetAssemblyInfo.cache │ │ ├── AcikSecim.WebApi.assets.cache │ │ ├── AcikSecim.WebApi.csproj.CoreCompileInputs.cache │ │ ├── AcikSecim.WebApi.csproj.FileListAbsolute.txt │ │ ├── AcikSecim.WebApi.csprojAssemblyReference.cache │ │ ├── AcikSecim.WebApi.dll │ │ └── AcikSecim.WebApi.pdb │ └── project.assets.json ├── AcikSecim.sln ├── DBYapisi └── Backup └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Custom 2 | appsetting.json 3 | 4 | *.swp 5 | *.*~ 6 | project.lock.json 7 | .DS_Store 8 | *.pyc 9 | nupkg/ 10 | 11 | # Visual Studio Code 12 | .vscode 13 | 14 | # Rider 15 | .idea 16 | 17 | # User-specific files 18 | *.suo 19 | *.user 20 | *.userosscache 21 | *.sln.docstates 22 | 23 | # Build results 24 | [Dd]ebug/ 25 | [Dd]ebugPublic/ 26 | [Rr]elease/ 27 | [Rr]eleases/ 28 | x64/ 29 | x86/ 30 | build/ 31 | bld/ 32 | [Bb]in/ 33 | [Oo]bj/ 34 | [Oo]ut/ 35 | msbuild.log 36 | msbuild.err 37 | msbuild.wrn 38 | 39 | # Visual Studio 2015 40 | .vs/ -------------------------------------------------------------------------------- /.vs/AcikSecim/DesignTimeBuild/.dtbcache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aciksecim/api-server/fd20ca91b03d27c2deb95bce311d8bca9b739ca9/.vs/AcikSecim/DesignTimeBuild/.dtbcache -------------------------------------------------------------------------------- /.vs/AcikSecim/config/applicationhost.config: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 48 | 49 | 50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | 59 | 60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | 79 |
80 |
81 | 82 |
83 |
84 |
85 |
86 |
87 |
88 | 89 |
90 |
91 |
92 |
93 |
94 | 95 |
96 |
97 |
98 | 99 |
100 |
101 | 102 |
103 |
104 | 105 |
106 |
107 |
108 | 109 | 110 |
111 |
112 |
113 |
114 |
115 |
116 | 117 |
118 |
119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 941 | 942 | 943 | 944 | 945 | 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | -------------------------------------------------------------------------------- /.vs/AcikSecim/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aciksecim/api-server/fd20ca91b03d27c2deb95bce311d8bca9b739ca9/.vs/AcikSecim/v15/.suo -------------------------------------------------------------------------------- /.vs/AcikSecim/v15/Server/sqlite3/db.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aciksecim/api-server/fd20ca91b03d27c2deb95bce311d8bca9b739ca9/.vs/AcikSecim/v15/Server/sqlite3/db.lock -------------------------------------------------------------------------------- /.vs/AcikSecim/v15/Server/sqlite3/storage.ide: -------------------------------------------------------------------------------- 1 | SQLite format 3@ .A  -------------------------------------------------------------------------------- /.vs/AcikSecim/v15/Server/sqlite3/storage.ide-shm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aciksecim/api-server/fd20ca91b03d27c2deb95bce311d8bca9b739ca9/.vs/AcikSecim/v15/Server/sqlite3/storage.ide-shm -------------------------------------------------------------------------------- /.vs/AcikSecim/v15/Server/sqlite3/storage.ide-wal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aciksecim/api-server/fd20ca91b03d27c2deb95bce311d8bca9b739ca9/.vs/AcikSecim/v15/Server/sqlite3/storage.ide-wal -------------------------------------------------------------------------------- /.vs/AcikSecim/v16/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aciksecim/api-server/fd20ca91b03d27c2deb95bce311d8bca9b739ca9/.vs/AcikSecim/v16/.suo -------------------------------------------------------------------------------- /.vs/AcikSecim/v16/Server/sqlite3/db.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aciksecim/api-server/fd20ca91b03d27c2deb95bce311d8bca9b739ca9/.vs/AcikSecim/v16/Server/sqlite3/db.lock -------------------------------------------------------------------------------- /.vs/AcikSecim/v16/Server/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aciksecim/api-server/fd20ca91b03d27c2deb95bce311d8bca9b739ca9/.vs/AcikSecim/v16/Server/sqlite3/storage.ide -------------------------------------------------------------------------------- /AcikSecim.WebApi/.dockerignore: -------------------------------------------------------------------------------- 1 | bin\ 2 | obj\ 3 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/AcikSecim.WebApi.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.2 5 | InProcess 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Controllers/ValuesController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IdentityModel.Tokens.Jwt; 4 | using System.Linq; 5 | using System.Net.Http; 6 | using System.Security.Claims; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using AcikSecim.WebApi.Models; 10 | using AcikSecim.WebApi.Models.DTOs; 11 | using Microsoft.AspNetCore.Mvc; 12 | using Microsoft.EntityFrameworkCore; 13 | using Microsoft.Extensions.Configuration; 14 | using Microsoft.IdentityModel.Tokens; 15 | 16 | namespace AcikSecim.WebApi.Controllers 17 | { 18 | [Route("api/[controller]")] 19 | [ApiController] 20 | public class ValuesController : ControllerBase 21 | { 22 | private AcikSecimDBContext _apiDbContext; 23 | private IConfiguration _configuration; 24 | public ValuesController(IConfiguration configuration) 25 | { 26 | _configuration = configuration; 27 | _apiDbContext = new AcikSecimDBContext(); 28 | } 29 | 30 | [HttpGet] 31 | [Route("adaylariGetir")] 32 | public ActionResult> Get() 33 | { 34 | List adaylarListesi = _apiDbContext.Adaylar.ToList(); 35 | return adaylarListesi; 36 | } 37 | 38 | 39 | [HttpPost] 40 | [Route("yeniKullaniciEkle")] 41 | public ActionResult KullaniciKayit([FromBody] Kullanicilar yeniKullanici) 42 | { 43 | _apiDbContext.Kullanicilar.Add(yeniKullanici); 44 | _apiDbContext.SaveChanges(); 45 | 46 | return Ok(); 47 | } 48 | 49 | [HttpPost] 50 | [Route("login")] 51 | public ActionResult Giris([FromBody] GirisDto kullanici) 52 | { 53 | var user = _apiDbContext.Kullanicilar.FirstOrDefault(k => k.Ad == kullanici.Adi || k.Soyad == kullanici.Soyadi); 54 | if (user == null) 55 | { 56 | return Unauthorized(); 57 | } 58 | 59 | var tokenHandler = new JwtSecurityTokenHandler(); 60 | var key = Encoding.ASCII.GetBytes(_configuration.GetSection("Appsettings:Token").Value); 61 | 62 | var tokenDescriptor = new SecurityTokenDescriptor 63 | { 64 | Subject = new ClaimsIdentity(new Claim[] 65 | { 66 | new Claim(ClaimTypes.NameIdentifier, user.Id.ToString()), 67 | new Claim(ClaimTypes.Name, user.Ad), 68 | new Claim(ClaimTypes.Surname, user.Soyad) 69 | }), 70 | Expires = DateTime.Now.AddDays(1), 71 | SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), 72 | SecurityAlgorithms.HmacSha512Signature) 73 | }; 74 | 75 | var token = tokenHandler.CreateToken(tokenDescriptor); 76 | var tokenString = tokenHandler.WriteToken(token); 77 | 78 | return Ok(tokenString); 79 | } 80 | 81 | 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env 2 | WORKDIR /app 3 | # Copy csproj and restore as distinct layers 4 | COPY *.csproj ./ 5 | RUN dotnet restore 6 | # Copy everything else and build 7 | COPY . ./ 8 | RUN dotnet publish -c Release -o out 9 | # Build runtime image 10 | FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 11 | WORKDIR /app 12 | COPY --from=build-env /app/out . 13 | ENTRYPOINT ["dotnet", "AcikSecim.WebApi.dll"] 14 | EXPOSE 80 15 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Models/AcikSecimDBContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Metadata; 4 | 5 | namespace AcikSecim.WebApi.Models 6 | { 7 | public partial class AcikSecimDBContext : DbContext 8 | { 9 | 10 | public virtual DbSet Adaylar { get; set; } 11 | public virtual DbSet Ilceler { get; set; } 12 | public virtual DbSet Kullanicilar { get; set; } 13 | public virtual DbSet Mahalleler { get; set; } 14 | public virtual DbSet Oturumlar { get; set; } 15 | public virtual DbSet Roller { get; set; } 16 | public virtual DbSet SandikDurumu { get; set; } 17 | public virtual DbSet Sandiklar { get; set; } 18 | public virtual DbSet Sehirler { get; set; } 19 | public virtual DbSet Sonuclar { get; set; } 20 | public virtual DbSet Tutanaklar { get; set; } 21 | 22 | protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) 23 | { 24 | // localhost 25 | 26 | // optionsBuilder.UseNpgsql("User ID=postgres; Password=1045246; Server=localhost; Port=5432; Database=AcikSecimDB; Integrated Security=true;"); 27 | 28 | optionsBuilder.UseNpgsql("User ID=postgres; Password=123456; Server=172.17.0.2; Port=5432; Database=AcikSecimDB; Integrated Security=true;"); 29 | } 30 | 31 | 32 | 33 | 34 | protected override void OnModelCreating(ModelBuilder modelBuilder) 35 | { 36 | modelBuilder.HasAnnotation("ProductVersion", "2.2.4-servicing-10062"); 37 | 38 | modelBuilder.Entity(entity => 39 | { 40 | entity.Property(e => e.Ad).HasMaxLength(50); 41 | 42 | entity.Property(e => e.Ad2).HasMaxLength(50); 43 | 44 | entity.Property(e => e.Ittifaki).HasMaxLength(50); 45 | 46 | entity.Property(e => e.Partisi).HasMaxLength(50); 47 | 48 | entity.Property(e => e.Soyad).HasMaxLength(50); 49 | }); 50 | 51 | modelBuilder.Entity(entity => 52 | { 53 | entity.HasIndex(e => e.SehirId) 54 | .HasName("Ilceler_IX_SehirId"); 55 | 56 | entity.Property(e => e.IlceAdi) 57 | .IsRequired() 58 | .HasMaxLength(50) 59 | .HasDefaultValueSql("''::character varying"); 60 | 61 | entity.HasOne(d => d.Sehir) 62 | .WithMany(p => p.Ilceler) 63 | .HasForeignKey(d => d.SehirId) 64 | .HasConstraintName("FK_public.Ilceler_public.Sehirler_SehirId"); 65 | }); 66 | 67 | modelBuilder.Entity(entity => 68 | { 69 | entity.HasIndex(e => e.MahalleId) 70 | .HasName("Kullanicilar_IX_MahalleId"); 71 | 72 | entity.HasIndex(e => e.RolId) 73 | .HasName("Kullanicilar_IX_RolId"); 74 | 75 | entity.Property(e => e.Ad).HasMaxLength(50); 76 | 77 | entity.Property(e => e.Ad2).HasMaxLength(50); 78 | 79 | entity.Property(e => e.Email).HasMaxLength(50); 80 | 81 | entity.Property(e => e.Soyad).HasMaxLength(50); 82 | 83 | entity.Property(e => e.TcNo).HasMaxLength(11); 84 | 85 | entity.Property(e => e.TelNo).HasMaxLength(11); 86 | 87 | entity.HasOne(d => d.Mahalle) 88 | .WithMany(p => p.Kullanicilar) 89 | .HasForeignKey(d => d.MahalleId) 90 | .HasConstraintName("FK_public.Kullanicilar_public.Mahalleler_MahalleId"); 91 | 92 | entity.HasOne(d => d.Rol) 93 | .WithMany(p => p.Kullanicilar) 94 | .HasForeignKey(d => d.RolId) 95 | .HasConstraintName("FK_public.Kullanicilar_public.Roller_RolId"); 96 | }); 97 | 98 | modelBuilder.Entity(entity => 99 | { 100 | entity.HasIndex(e => e.IlceId) 101 | .HasName("Mahalleler_IX_IlceId"); 102 | 103 | entity.Property(e => e.MahalleAdi) 104 | .IsRequired() 105 | .HasMaxLength(100) 106 | .HasDefaultValueSql("''::character varying"); 107 | 108 | entity.HasOne(d => d.Ilce) 109 | .WithMany(p => p.Mahalleler) 110 | .HasForeignKey(d => d.IlceId) 111 | .HasConstraintName("FK_public.Mahalleler_public.Ilceler_IlceId"); 112 | }); 113 | 114 | modelBuilder.Entity(entity => 115 | { 116 | entity.HasIndex(e => e.KullaniciId) 117 | .HasName("Oturumlar_IX_KullaniciId"); 118 | 119 | entity.Property(e => e.OturumIp).HasMaxLength(50); 120 | 121 | entity.Property(e => e.OturumTarayicisi).HasMaxLength(50); 122 | 123 | entity.HasOne(d => d.Kullanici) 124 | .WithMany(p => p.Oturumlar) 125 | .HasForeignKey(d => d.KullaniciId) 126 | .HasConstraintName("FK_public.Oturumlar_public.Kullanicilar_KullaniciId"); 127 | }); 128 | 129 | modelBuilder.Entity(entity => 130 | { 131 | entity.Property(e => e.Id).ValueGeneratedNever(); 132 | 133 | entity.Property(e => e.RolAdi) 134 | .IsRequired() 135 | .HasMaxLength(20) 136 | .HasDefaultValueSql("''::character varying"); 137 | }); 138 | 139 | modelBuilder.Entity(entity => 140 | { 141 | entity.HasIndex(e => e.KullaniciId) 142 | .HasName("SandikDurumu_IX_KullaniciId"); 143 | 144 | entity.HasIndex(e => e.SandikId) 145 | .HasName("SandikDurumu_IX_SandikId"); 146 | 147 | entity.HasOne(d => d.Kullanici) 148 | .WithMany(p => p.SandikDurumu) 149 | .HasForeignKey(d => d.KullaniciId) 150 | .HasConstraintName("FK_public.SandikDurumu_public.Kullanicilar_KullaniciId"); 151 | 152 | entity.HasOne(d => d.Sandik) 153 | .WithMany(p => p.SandikDurumu) 154 | .HasForeignKey(d => d.SandikId) 155 | .HasConstraintName("FK_public.SandikDurumu_public.Sandiklar_SandikId"); 156 | }); 157 | 158 | modelBuilder.Entity(entity => 159 | { 160 | entity.HasIndex(e => e.MahalleId) 161 | .HasName("Sandiklar_IX_MahalleId"); 162 | 163 | entity.HasOne(d => d.Mahalle) 164 | .WithMany(p => p.Sandiklar) 165 | .HasForeignKey(d => d.MahalleId) 166 | .HasConstraintName("FK_public.Sandiklar_public.Mahalleler_MahalleId"); 167 | }); 168 | 169 | modelBuilder.Entity(entity => 170 | { 171 | entity.Property(e => e.SehirAdi) 172 | .IsRequired() 173 | .HasMaxLength(50) 174 | .HasDefaultValueSql("''::character varying"); 175 | }); 176 | 177 | modelBuilder.Entity(entity => 178 | { 179 | entity.HasIndex(e => e.AdayId) 180 | .HasName("Sonuclar_IX_AdayId"); 181 | 182 | entity.HasIndex(e => e.KullaniciId) 183 | .HasName("Sonuclar_IX_KullaniciId"); 184 | 185 | entity.HasIndex(e => e.SandikId) 186 | .HasName("Sonuclar_IX_SandikId"); 187 | 188 | entity.HasOne(d => d.Aday) 189 | .WithMany(p => p.Sonuclar) 190 | .HasForeignKey(d => d.AdayId) 191 | .HasConstraintName("FK_public.Sonuclar_public.Adaylar_AdayId"); 192 | 193 | entity.HasOne(d => d.Kullanici) 194 | .WithMany(p => p.Sonuclar) 195 | .HasForeignKey(d => d.KullaniciId) 196 | .HasConstraintName("FK_public.Sonuclar_public.Kullanicilar_KullaniciId"); 197 | 198 | entity.HasOne(d => d.Sandik) 199 | .WithMany(p => p.Sonuclar) 200 | .HasForeignKey(d => d.SandikId) 201 | .HasConstraintName("FK_public.Sonuclar_public.Sandiklar_SandikId"); 202 | }); 203 | 204 | modelBuilder.Entity(entity => 205 | { 206 | entity.HasIndex(e => e.KullaniciId) 207 | .HasName("Tutanaklar_IX_KullaniciId"); 208 | 209 | entity.HasIndex(e => e.OnaylayanId) 210 | .HasName("Tutanaklar_IX_OnaylayanId"); 211 | 212 | entity.HasIndex(e => e.SandikId) 213 | .HasName("Tutanaklar_IX_SandikId"); 214 | 215 | entity.Property(e => e.Resim).HasMaxLength(300); 216 | 217 | entity.HasOne(d => d.Kullanici) 218 | .WithMany(p => p.TutanaklarKullanici) 219 | .HasForeignKey(d => d.KullaniciId) 220 | .HasConstraintName("FK_public.Tutanaklar_public.Kullanicilar_KullaniciId"); 221 | 222 | entity.HasOne(d => d.Onaylayan) 223 | .WithMany(p => p.TutanaklarOnaylayan) 224 | .HasForeignKey(d => d.OnaylayanId) 225 | .HasConstraintName("FK_public.Tutanaklar_public.Kullanicilar_OnaylayanId"); 226 | 227 | entity.HasOne(d => d.Sandik) 228 | .WithMany(p => p.Tutanaklar) 229 | .HasForeignKey(d => d.SandikId) 230 | .HasConstraintName("FK_public.Tutanaklar_public.Sandiklar_SandikId"); 231 | }); 232 | } 233 | } 234 | } 235 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Models/Adaylar.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace AcikSecim.WebApi.Models 5 | { 6 | public partial class Adaylar 7 | { 8 | public Adaylar() 9 | { 10 | Sonuclar = new HashSet(); 11 | } 12 | 13 | public int Id { get; set; } 14 | public string Ad { get; set; } 15 | public string Ad2 { get; set; } 16 | public string Partisi { get; set; } 17 | public string Ittifaki { get; set; } 18 | public string Soyad { get; set; } 19 | 20 | public virtual ICollection Sonuclar { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Models/DTOs/GirisDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace AcikSecim.WebApi.Models.DTOs 7 | { 8 | public class GirisDto 9 | { 10 | public string Adi { get; set; } 11 | public string Soyadi { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Models/Ilceler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace AcikSecim.WebApi.Models 5 | { 6 | public partial class Ilceler 7 | { 8 | public Ilceler() 9 | { 10 | Mahalleler = new HashSet(); 11 | } 12 | 13 | public int Id { get; set; } 14 | public int? SehirId { get; set; } 15 | public string IlceAdi { get; set; } 16 | 17 | public virtual Sehirler Sehir { get; set; } 18 | public virtual ICollection Mahalleler { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Models/Kullanicilar.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace AcikSecim.WebApi.Models 5 | { 6 | public partial class Kullanicilar 7 | { 8 | public Kullanicilar() 9 | { 10 | Oturumlar = new HashSet(); 11 | SandikDurumu = new HashSet(); 12 | Sonuclar = new HashSet(); 13 | TutanaklarKullanici = new HashSet(); 14 | TutanaklarOnaylayan = new HashSet(); 15 | } 16 | 17 | public long Id { get; set; } 18 | public string Ad { get; set; } 19 | public string Ad2 { get; set; } 20 | public string Soyad { get; set; } 21 | public string TcNo { get; set; } 22 | public string Email { get; set; } 23 | public string TelNo { get; set; } 24 | public int? Durum { get; set; } 25 | public DateTime? KayitTarihi { get; set; } 26 | public int? KullaniciPuani { get; set; } 27 | public int? MahalleId { get; set; } 28 | public int? RolId { get; set; } 29 | 30 | public virtual Mahalleler Mahalle { get; set; } 31 | public virtual Roller Rol { get; set; } 32 | public virtual ICollection Oturumlar { get; set; } 33 | public virtual ICollection SandikDurumu { get; set; } 34 | public virtual ICollection Sonuclar { get; set; } 35 | public virtual ICollection TutanaklarKullanici { get; set; } 36 | public virtual ICollection TutanaklarOnaylayan { get; set; } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Models/Mahalleler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace AcikSecim.WebApi.Models 5 | { 6 | public partial class Mahalleler 7 | { 8 | public Mahalleler() 9 | { 10 | Kullanicilar = new HashSet(); 11 | Sandiklar = new HashSet(); 12 | } 13 | 14 | public int Id { get; set; } 15 | public int? IlceId { get; set; } 16 | public string MahalleAdi { get; set; } 17 | 18 | public virtual Ilceler Ilce { get; set; } 19 | public virtual ICollection Kullanicilar { get; set; } 20 | public virtual ICollection Sandiklar { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Models/Oturumlar.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace AcikSecim.WebApi.Models 5 | { 6 | public partial class Oturumlar 7 | { 8 | public long Id { get; set; } 9 | public long? KullaniciId { get; set; } 10 | public DateTime? OturumZamani { get; set; } 11 | public string OturumIp { get; set; } 12 | public string OturumTarayicisi { get; set; } 13 | 14 | public virtual Kullanicilar Kullanici { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Models/Roller.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace AcikSecim.WebApi.Models 5 | { 6 | public partial class Roller 7 | { 8 | public Roller() 9 | { 10 | Kullanicilar = new HashSet(); 11 | } 12 | 13 | public int Id { get; set; } 14 | public string RolAdi { get; set; } 15 | public int Haklari { get; set; } 16 | 17 | public virtual ICollection Kullanicilar { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Models/SandikDurumu.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace AcikSecim.WebApi.Models 5 | { 6 | public partial class SandikDurumu 7 | { 8 | public int Id { get; set; } 9 | public long? SandikId { get; set; } 10 | public long? KullaniciId { get; set; } 11 | public int? GecerliOySayisi { get; set; } 12 | public int? GecersizOySayisi { get; set; } 13 | public int? ToplamSecmenSayisi { get; set; } 14 | 15 | public virtual Kullanicilar Kullanici { get; set; } 16 | public virtual Sandiklar Sandik { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Models/Sandiklar.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace AcikSecim.WebApi.Models 5 | { 6 | public partial class Sandiklar 7 | { 8 | public Sandiklar() 9 | { 10 | SandikDurumu = new HashSet(); 11 | Sonuclar = new HashSet(); 12 | Tutanaklar = new HashSet(); 13 | } 14 | 15 | public long Id { get; set; } 16 | public int SandikNo { get; set; } 17 | public int? MahalleId { get; set; } 18 | 19 | public virtual Mahalleler Mahalle { get; set; } 20 | public virtual ICollection SandikDurumu { get; set; } 21 | public virtual ICollection Sonuclar { get; set; } 22 | public virtual ICollection Tutanaklar { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Models/Sehirler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace AcikSecim.WebApi.Models 5 | { 6 | public partial class Sehirler 7 | { 8 | public Sehirler() 9 | { 10 | Ilceler = new HashSet(); 11 | } 12 | 13 | public int Id { get; set; } 14 | public string SehirAdi { get; set; } 15 | 16 | public virtual ICollection Ilceler { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Models/Sonuclar.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace AcikSecim.WebApi.Models 5 | { 6 | public partial class Sonuclar 7 | { 8 | public int Id { get; set; } 9 | public long? KullaniciId { get; set; } 10 | public long? SandikId { get; set; } 11 | public int? AdayId { get; set; } 12 | public int? OySayisi { get; set; } 13 | 14 | public virtual Adaylar Aday { get; set; } 15 | public virtual Kullanicilar Kullanici { get; set; } 16 | public virtual Sandiklar Sandik { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Models/Tutanaklar.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace AcikSecim.WebApi.Models 5 | { 6 | public partial class Tutanaklar 7 | { 8 | public long Id { get; set; } 9 | public long? SandikId { get; set; } 10 | public long? KullaniciId { get; set; } 11 | public string Resim { get; set; } 12 | public DateTime? GonderilmeTarihi { get; set; } 13 | public bool? OnayliMi { get; set; } 14 | public DateTime? OnayTarihi { get; set; } 15 | public long? OnaylayanId { get; set; } 16 | 17 | public virtual Kullanicilar Kullanici { get; set; } 18 | public virtual Kullanicilar Onaylayan { get; set; } 19 | public virtual Sandiklar Sandik { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace AcikSecim.WebApi 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateWebHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:11238", 8 | "sslPort": 44340 9 | } 10 | }, 11 | "profiles": { 12 | "IIS Express": { 13 | "commandName": "IISExpress", 14 | "launchBrowser": true, 15 | "launchUrl": "api/values", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | } 19 | }, 20 | "AcikSecim.WebApi": { 21 | "commandName": "Project", 22 | "launchBrowser": true, 23 | "launchUrl": "api/values", 24 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /AcikSecim.WebApi/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using AcikSecim.WebApi.Models; 7 | using Microsoft.AspNetCore.Authentication.JwtBearer; 8 | using Microsoft.AspNetCore.Builder; 9 | using Microsoft.AspNetCore.Hosting; 10 | using Microsoft.AspNetCore.HttpsPolicy; 11 | using Microsoft.AspNetCore.Mvc; 12 | using Microsoft.EntityFrameworkCore; 13 | using Microsoft.Extensions.Configuration; 14 | using Microsoft.Extensions.DependencyInjection; 15 | using Microsoft.Extensions.Logging; 16 | using Microsoft.Extensions.Options; 17 | using Microsoft.IdentityModel.Tokens; 18 | 19 | namespace AcikSecim.WebApi 20 | { 21 | public class Startup 22 | { 23 | public Startup(IConfiguration configuration) 24 | { 25 | Configuration = configuration; 26 | } 27 | 28 | public IConfiguration Configuration { get; } 29 | 30 | // This method gets called by the runtime. Use this method to add services to the container. 31 | public void ConfigureServices(IServiceCollection services) 32 | { 33 | var key = Encoding.ASCII.GetBytes(Configuration.GetSection("Appsettings:Token").Value); 34 | services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); 35 | 36 | //JWT Token Konfigurasyonu 37 | services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme).AddJwtBearer(options => 38 | { 39 | options.TokenValidationParameters = new TokenValidationParameters 40 | { 41 | ValidateIssuerSigningKey = true, 42 | IssuerSigningKey = new SymmetricSecurityKey(key), 43 | ValidateIssuer = false, 44 | ValidateAudience = false 45 | }; 46 | }); 47 | } 48 | 49 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 50 | public void Configure(IApplicationBuilder app, IHostingEnvironment env) 51 | { 52 | if (env.IsDevelopment()) 53 | { 54 | app.UseDeveloperExceptionPage(); 55 | } 56 | else 57 | { 58 | app.UseHsts(); 59 | } 60 | using (var apiContext = new AcikSecimDBContext()) 61 | { 62 | apiContext.Database.Migrate(); 63 | } 64 | app.UseHttpsRedirection(); 65 | app.UseAuthentication(); 66 | app.UseMvc(); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AppSettings": { 3 | "Token" : "benim super gizli anahtarim" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Warning" 8 | } 9 | }, 10 | "AllowedHosts": "*" 11 | } 12 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/bin/Debug/netcoreapp2.2/AcikSecim.WebApi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aciksecim/api-server/fd20ca91b03d27c2deb95bce311d8bca9b739ca9/AcikSecim.WebApi/bin/Debug/netcoreapp2.2/AcikSecim.WebApi.dll -------------------------------------------------------------------------------- /AcikSecim.WebApi/bin/Debug/netcoreapp2.2/AcikSecim.WebApi.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aciksecim/api-server/fd20ca91b03d27c2deb95bce311d8bca9b739ca9/AcikSecim.WebApi/bin/Debug/netcoreapp2.2/AcikSecim.WebApi.pdb -------------------------------------------------------------------------------- /AcikSecim.WebApi/bin/Debug/netcoreapp2.2/AcikSecim.WebApi.runtimeconfig.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "additionalProbingPaths": [ 4 | "C:\\Users\\Freo\\.dotnet\\store\\|arch|\\|tfm|", 5 | "C:\\Users\\Freo\\.nuget\\packages", 6 | "D:\\Microsoft\\Xamarin\\NuGet", 7 | "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" 8 | ] 9 | } 10 | } -------------------------------------------------------------------------------- /AcikSecim.WebApi/bin/Debug/netcoreapp2.2/AcikSecim.WebApi.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "netcoreapp2.2", 4 | "framework": { 5 | "name": "Microsoft.AspNetCore.App", 6 | "version": "2.2.0" 7 | }, 8 | "configProperties": { 9 | "System.GC.Server": true 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /AcikSecim.WebApi/db/dbexport.pgsql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aciksecim/api-server/fd20ca91b03d27c2deb95bce311d8bca9b739ca9/AcikSecim.WebApi/db/dbexport.pgsql -------------------------------------------------------------------------------- /AcikSecim.WebApi/obj/AcikSecim.WebApi.csproj.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "dgSpecHash": "PzScpCBo91tZBiTuz+ww1uF+bs7+l4v9/gwxZNUtQt88gSkA3EtsCxnBkuJPm0byGbcj5uI1vPs/JC7plYRFHg==", 4 | "success": true 5 | } -------------------------------------------------------------------------------- /AcikSecim.WebApi/obj/AcikSecim.WebApi.csproj.nuget.dgspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "format": 1, 3 | "restore": { 4 | "F:\\Source\\Repos\\Github\\api-server\\AcikSecim.WebApi\\AcikSecim.WebApi.csproj": {} 5 | }, 6 | "projects": { 7 | "F:\\Source\\Repos\\Github\\api-server\\AcikSecim.WebApi\\AcikSecim.WebApi.csproj": { 8 | "version": "1.0.0", 9 | "restore": { 10 | "projectUniqueName": "F:\\Source\\Repos\\Github\\api-server\\AcikSecim.WebApi\\AcikSecim.WebApi.csproj", 11 | "projectName": "AcikSecim.WebApi", 12 | "projectPath": "F:\\Source\\Repos\\Github\\api-server\\AcikSecim.WebApi\\AcikSecim.WebApi.csproj", 13 | "packagesPath": "C:\\Users\\Freo\\.nuget\\packages\\", 14 | "outputPath": "F:\\Source\\Repos\\Github\\api-server\\AcikSecim.WebApi\\obj\\", 15 | "projectStyle": "PackageReference", 16 | "fallbackFolders": [ 17 | "D:\\Microsoft\\Xamarin\\NuGet\\", 18 | "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" 19 | ], 20 | "configFilePaths": [ 21 | "C:\\Users\\Freo\\AppData\\Roaming\\NuGet\\NuGet.Config", 22 | "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", 23 | "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" 24 | ], 25 | "originalTargetFrameworks": [ 26 | "netcoreapp2.2" 27 | ], 28 | "sources": { 29 | "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, 30 | "https://api.nuget.org/v3/index.json": {} 31 | }, 32 | "frameworks": { 33 | "netcoreapp2.2": { 34 | "projectReferences": {} 35 | } 36 | }, 37 | "warningProperties": { 38 | "warnAsError": [ 39 | "NU1605" 40 | ] 41 | } 42 | }, 43 | "frameworks": { 44 | "netcoreapp2.2": { 45 | "dependencies": { 46 | "Microsoft.AspNetCore.App": { 47 | "suppressParent": "All", 48 | "target": "Package", 49 | "version": "[2.2.0, )", 50 | "autoReferenced": true 51 | }, 52 | "Microsoft.AspNetCore.Razor.Design": { 53 | "suppressParent": "All", 54 | "target": "Package", 55 | "version": "[2.2.0, )" 56 | }, 57 | "Microsoft.EntityFrameworkCore": { 58 | "target": "Package", 59 | "version": "[2.2.4, )" 60 | }, 61 | "Microsoft.NETCore.App": { 62 | "suppressParent": "All", 63 | "target": "Package", 64 | "version": "[2.2.0, )", 65 | "autoReferenced": true 66 | }, 67 | "Npgsql.EntityFrameworkCore.PostgreSQL": { 68 | "target": "Package", 69 | "version": "[2.2.4, )" 70 | } 71 | }, 72 | "imports": [ 73 | "net461" 74 | ], 75 | "assetTargetFallback": true, 76 | "warn": true 77 | } 78 | } 79 | } 80 | } 81 | } -------------------------------------------------------------------------------- /AcikSecim.WebApi/obj/AcikSecim.WebApi.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | True 5 | NuGet 6 | $(MSBuildThisFileDirectory)project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\Freo\.nuget\packages\;D:\Microsoft\Xamarin\NuGet\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 5.1.0 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.entityframeworkcore.tools\2.2.0 26 | C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.codeanalysis.analyzers\1.1.0 27 | C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.razor.design\2.2.0 28 | 29 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/obj/AcikSecim.WebApi.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/obj/Debug/netcoreapp2.2/AcikSecim.WebApi.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("AcikSecim.WebApi")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 18 | [assembly: System.Reflection.AssemblyProductAttribute("AcikSecim.WebApi")] 19 | [assembly: System.Reflection.AssemblyTitleAttribute("AcikSecim.WebApi")] 20 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 21 | 22 | // Generated by the MSBuild WriteCodeFragment class. 23 | 24 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/obj/Debug/netcoreapp2.2/AcikSecim.WebApi.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 377dcaad5acc32e8a284cc82a07513d0316ce610 2 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/obj/Debug/netcoreapp2.2/AcikSecim.WebApi.RazorAssemblyInfo.cache: -------------------------------------------------------------------------------- 1 | b573734fd6f0be0f16fa0db45435ac023718abd9 2 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/obj/Debug/netcoreapp2.2/AcikSecim.WebApi.RazorAssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.RelatedAssemblyAttribute("AcikSecim.WebApi.Views")] 15 | [assembly: Microsoft.AspNetCore.Razor.Hosting.RazorLanguageVersionAttribute("2.1")] 16 | [assembly: Microsoft.AspNetCore.Razor.Hosting.RazorConfigurationNameAttribute("MVC-2.1")] 17 | [assembly: Microsoft.AspNetCore.Razor.Hosting.RazorExtensionAssemblyNameAttribute("MVC-2.1", "Microsoft.AspNetCore.Mvc.Razor.Extensions")] 18 | 19 | // Generated by the MSBuild WriteCodeFragment class. 20 | 21 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/obj/Debug/netcoreapp2.2/AcikSecim.WebApi.RazorTargetAssemblyInfo.cache: -------------------------------------------------------------------------------- 1 | 5845104d7a3d0a3eec15a5ca09e731947f637dd4 2 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/obj/Debug/netcoreapp2.2/AcikSecim.WebApi.assets.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aciksecim/api-server/fd20ca91b03d27c2deb95bce311d8bca9b739ca9/AcikSecim.WebApi/obj/Debug/netcoreapp2.2/AcikSecim.WebApi.assets.cache -------------------------------------------------------------------------------- /AcikSecim.WebApi/obj/Debug/netcoreapp2.2/AcikSecim.WebApi.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 699527eefbe37f498bbb29ae2b84dbd8d9594ef2 2 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/obj/Debug/netcoreapp2.2/AcikSecim.WebApi.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\GitHub\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\bin\Debug\netcoreapp2.2\AcikSecim.WebApi.deps.json 2 | D:\GitHub\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\bin\Debug\netcoreapp2.2\AcikSecim.WebApi.runtimeconfig.json 3 | D:\GitHub\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\bin\Debug\netcoreapp2.2\AcikSecim.WebApi.runtimeconfig.dev.json 4 | D:\GitHub\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\bin\Debug\netcoreapp2.2\AcikSecim.WebApi.dll 5 | D:\GitHub\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.csprojAssemblyReference.cache 6 | D:\GitHub\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.csproj.CoreCompileInputs.cache 7 | D:\GitHub\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.RazorAssemblyInfo.cache 8 | D:\GitHub\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.RazorAssemblyInfo.cs 9 | D:\GitHub\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.AssemblyInfoInputs.cache 10 | D:\GitHub\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.AssemblyInfo.cs 11 | D:\GitHub\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.RazorTargetAssemblyInfo.cache 12 | D:\GitHub\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\bin\Debug\netcoreapp2.2\AcikSecim.WebApi.pdb 13 | D:\GitHub\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.dll 14 | D:\GitHub\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.pdb 15 | D:\Source\Repos\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\bin\Debug\netcoreapp2.2\AcikSecim.WebApi.deps.json 16 | D:\Source\Repos\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\bin\Debug\netcoreapp2.2\AcikSecim.WebApi.runtimeconfig.json 17 | D:\Source\Repos\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\bin\Debug\netcoreapp2.2\AcikSecim.WebApi.runtimeconfig.dev.json 18 | D:\Source\Repos\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\bin\Debug\netcoreapp2.2\AcikSecim.WebApi.dll 19 | D:\Source\Repos\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\bin\Debug\netcoreapp2.2\AcikSecim.WebApi.pdb 20 | D:\Source\Repos\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.csprojAssemblyReference.cache 21 | D:\Source\Repos\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.csproj.CoreCompileInputs.cache 22 | D:\Source\Repos\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.RazorAssemblyInfo.cache 23 | D:\Source\Repos\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.RazorAssemblyInfo.cs 24 | D:\Source\Repos\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.AssemblyInfoInputs.cache 25 | D:\Source\Repos\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.AssemblyInfo.cs 26 | D:\Source\Repos\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.RazorTargetAssemblyInfo.cache 27 | D:\Source\Repos\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.dll 28 | D:\Source\Repos\AcikSecimProjesi\AcikSecim\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.pdb 29 | F:\Source\Repos\Github\api-server\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.csprojAssemblyReference.cache 30 | F:\Source\Repos\Github\api-server\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.csproj.CoreCompileInputs.cache 31 | F:\Source\Repos\Github\api-server\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.RazorAssemblyInfo.cache 32 | F:\Source\Repos\Github\api-server\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.RazorAssemblyInfo.cs 33 | F:\Source\Repos\Github\api-server\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.AssemblyInfoInputs.cache 34 | F:\Source\Repos\Github\api-server\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.AssemblyInfo.cs 35 | F:\Source\Repos\Github\api-server\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.dll 36 | F:\Source\Repos\Github\api-server\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.pdb 37 | F:\Source\Repos\Github\api-server\AcikSecim.WebApi\bin\Debug\netcoreapp2.2\AcikSecim.WebApi.deps.json 38 | F:\Source\Repos\Github\api-server\AcikSecim.WebApi\bin\Debug\netcoreapp2.2\AcikSecim.WebApi.runtimeconfig.json 39 | F:\Source\Repos\Github\api-server\AcikSecim.WebApi\bin\Debug\netcoreapp2.2\AcikSecim.WebApi.runtimeconfig.dev.json 40 | F:\Source\Repos\Github\api-server\AcikSecim.WebApi\bin\Debug\netcoreapp2.2\AcikSecim.WebApi.dll 41 | F:\Source\Repos\Github\api-server\AcikSecim.WebApi\bin\Debug\netcoreapp2.2\AcikSecim.WebApi.pdb 42 | F:\Source\Repos\Github\api-server\AcikSecim.WebApi\obj\Debug\netcoreapp2.2\AcikSecim.WebApi.RazorTargetAssemblyInfo.cache 43 | -------------------------------------------------------------------------------- /AcikSecim.WebApi/obj/Debug/netcoreapp2.2/AcikSecim.WebApi.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aciksecim/api-server/fd20ca91b03d27c2deb95bce311d8bca9b739ca9/AcikSecim.WebApi/obj/Debug/netcoreapp2.2/AcikSecim.WebApi.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /AcikSecim.WebApi/obj/Debug/netcoreapp2.2/AcikSecim.WebApi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aciksecim/api-server/fd20ca91b03d27c2deb95bce311d8bca9b739ca9/AcikSecim.WebApi/obj/Debug/netcoreapp2.2/AcikSecim.WebApi.dll -------------------------------------------------------------------------------- /AcikSecim.WebApi/obj/Debug/netcoreapp2.2/AcikSecim.WebApi.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aciksecim/api-server/fd20ca91b03d27c2deb95bce311d8bca9b739ca9/AcikSecim.WebApi/obj/Debug/netcoreapp2.2/AcikSecim.WebApi.pdb -------------------------------------------------------------------------------- /AcikSecim.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.28803.452 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AcikSecim.WebApi", "AcikSecim.WebApi\AcikSecim.WebApi.csproj", "{6DDBA41B-D1A3-4A63-9DE7-47B96EABAE4C}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {6DDBA41B-D1A3-4A63-9DE7-47B96EABAE4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {6DDBA41B-D1A3-4A63-9DE7-47B96EABAE4C}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {6DDBA41B-D1A3-4A63-9DE7-47B96EABAE4C}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {6DDBA41B-D1A3-4A63-9DE7-47B96EABAE4C}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {98502293-0038-48CD-A1CC-8D379C9AF564} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /DBYapisi/Backup: -------------------------------------------------------------------------------- 1 | -- 2 | -- PostgreSQL database dump 3 | -- 4 | 5 | -- Dumped from database version 11.3 6 | -- Dumped by pg_dump version 11.3 7 | 8 | SET statement_timeout = 0; 9 | SET lock_timeout = 0; 10 | SET idle_in_transaction_session_timeout = 0; 11 | SET client_encoding = 'UTF8'; 12 | SET standard_conforming_strings = on; 13 | SELECT pg_catalog.set_config('search_path', '', false); 14 | SET check_function_bodies = false; 15 | SET xmloption = content; 16 | SET client_min_messages = warning; 17 | SET row_security = off; 18 | 19 | SET default_tablespace = ''; 20 | 21 | SET default_with_oids = false; 22 | 23 | -- 24 | -- Name: Adaylar; Type: TABLE; Schema: public; Owner: postgres 25 | -- 26 | 27 | CREATE TABLE public."Adaylar" ( 28 | "Id" integer NOT NULL, 29 | "Ad" character varying(50), 30 | "Ad2" character varying(50), 31 | "Partisi" character varying(50), 32 | "Ittifaki" character varying(50), 33 | "Soyad" character varying(50) 34 | ); 35 | 36 | 37 | ALTER TABLE public."Adaylar" OWNER TO postgres; 38 | 39 | -- 40 | -- Name: Adaylar_Id_seq; Type: SEQUENCE; Schema: public; Owner: postgres 41 | -- 42 | 43 | CREATE SEQUENCE public."Adaylar_Id_seq" 44 | AS integer 45 | START WITH 1 46 | INCREMENT BY 1 47 | NO MINVALUE 48 | NO MAXVALUE 49 | CACHE 1; 50 | 51 | 52 | ALTER TABLE public."Adaylar_Id_seq" OWNER TO postgres; 53 | 54 | -- 55 | -- Name: Adaylar_Id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres 56 | -- 57 | 58 | ALTER SEQUENCE public."Adaylar_Id_seq" OWNED BY public."Adaylar"."Id"; 59 | 60 | 61 | -- 62 | -- Name: Ilceler; Type: TABLE; Schema: public; Owner: postgres 63 | -- 64 | 65 | CREATE TABLE public."Ilceler" ( 66 | "Id" integer NOT NULL, 67 | "SehirId" integer, 68 | "IlceAdi" character varying(50) DEFAULT ''::character varying NOT NULL 69 | ); 70 | 71 | 72 | ALTER TABLE public."Ilceler" OWNER TO postgres; 73 | 74 | -- 75 | -- Name: Ilceler_Id_seq; Type: SEQUENCE; Schema: public; Owner: postgres 76 | -- 77 | 78 | CREATE SEQUENCE public."Ilceler_Id_seq" 79 | AS integer 80 | START WITH 1 81 | INCREMENT BY 1 82 | NO MINVALUE 83 | NO MAXVALUE 84 | CACHE 1; 85 | 86 | 87 | ALTER TABLE public."Ilceler_Id_seq" OWNER TO postgres; 88 | 89 | -- 90 | -- Name: Ilceler_Id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres 91 | -- 92 | 93 | ALTER SEQUENCE public."Ilceler_Id_seq" OWNED BY public."Ilceler"."Id"; 94 | 95 | 96 | -- 97 | -- Name: Kullanicilar; Type: TABLE; Schema: public; Owner: postgres 98 | -- 99 | 100 | CREATE TABLE public."Kullanicilar" ( 101 | "Id" bigint NOT NULL, 102 | "Ad" character varying(50), 103 | "Ad2" character varying(50), 104 | "Soyad" character varying(50), 105 | "TcNo" character varying(11), 106 | "Email" character varying(50), 107 | "TelNo" character varying(11), 108 | "Durum" integer, 109 | "KayitTarihi" timestamp without time zone, 110 | "KullaniciPuani" integer, 111 | "MahalleId" integer, 112 | "RolId" integer 113 | ); 114 | 115 | 116 | ALTER TABLE public."Kullanicilar" OWNER TO postgres; 117 | 118 | -- 119 | -- Name: Kullanicilar_Id_seq; Type: SEQUENCE; Schema: public; Owner: postgres 120 | -- 121 | 122 | CREATE SEQUENCE public."Kullanicilar_Id_seq" 123 | START WITH 1 124 | INCREMENT BY 1 125 | NO MINVALUE 126 | NO MAXVALUE 127 | CACHE 1; 128 | 129 | 130 | ALTER TABLE public."Kullanicilar_Id_seq" OWNER TO postgres; 131 | 132 | -- 133 | -- Name: Kullanicilar_Id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres 134 | -- 135 | 136 | ALTER SEQUENCE public."Kullanicilar_Id_seq" OWNED BY public."Kullanicilar"."Id"; 137 | 138 | 139 | -- 140 | -- Name: Mahalleler; Type: TABLE; Schema: public; Owner: postgres 141 | -- 142 | 143 | CREATE TABLE public."Mahalleler" ( 144 | "Id" integer NOT NULL, 145 | "IlceId" integer, 146 | "MahalleAdi" character varying(100) DEFAULT ''::character varying NOT NULL 147 | ); 148 | 149 | 150 | ALTER TABLE public."Mahalleler" OWNER TO postgres; 151 | 152 | -- 153 | -- Name: Mahalleler_Id_seq; Type: SEQUENCE; Schema: public; Owner: postgres 154 | -- 155 | 156 | CREATE SEQUENCE public."Mahalleler_Id_seq" 157 | AS integer 158 | START WITH 1 159 | INCREMENT BY 1 160 | NO MINVALUE 161 | NO MAXVALUE 162 | CACHE 1; 163 | 164 | 165 | ALTER TABLE public."Mahalleler_Id_seq" OWNER TO postgres; 166 | 167 | -- 168 | -- Name: Mahalleler_Id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres 169 | -- 170 | 171 | ALTER SEQUENCE public."Mahalleler_Id_seq" OWNED BY public."Mahalleler"."Id"; 172 | 173 | 174 | -- 175 | -- Name: Oturumlar; Type: TABLE; Schema: public; Owner: postgres 176 | -- 177 | 178 | CREATE TABLE public."Oturumlar" ( 179 | "Id" bigint NOT NULL, 180 | "KullaniciId" bigint, 181 | "OturumZamani" timestamp without time zone, 182 | "OturumIp" character varying(50), 183 | "OturumTarayicisi" character varying(50) 184 | ); 185 | 186 | 187 | ALTER TABLE public."Oturumlar" OWNER TO postgres; 188 | 189 | -- 190 | -- Name: Oturumlar_Id_seq; Type: SEQUENCE; Schema: public; Owner: postgres 191 | -- 192 | 193 | CREATE SEQUENCE public."Oturumlar_Id_seq" 194 | START WITH 1 195 | INCREMENT BY 1 196 | NO MINVALUE 197 | NO MAXVALUE 198 | CACHE 1; 199 | 200 | 201 | ALTER TABLE public."Oturumlar_Id_seq" OWNER TO postgres; 202 | 203 | -- 204 | -- Name: Oturumlar_Id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres 205 | -- 206 | 207 | ALTER SEQUENCE public."Oturumlar_Id_seq" OWNED BY public."Oturumlar"."Id"; 208 | 209 | 210 | -- 211 | -- Name: Roller; Type: TABLE; Schema: public; Owner: postgres 212 | -- 213 | 214 | CREATE TABLE public."Roller" ( 215 | "Id" integer DEFAULT 0 NOT NULL, 216 | "RolAdi" character varying(20) DEFAULT ''::character varying NOT NULL, 217 | "Haklari" integer DEFAULT 0 NOT NULL 218 | ); 219 | 220 | 221 | ALTER TABLE public."Roller" OWNER TO postgres; 222 | 223 | -- 224 | -- Name: SandikDurumu; Type: TABLE; Schema: public; Owner: postgres 225 | -- 226 | 227 | CREATE TABLE public."SandikDurumu" ( 228 | "Id" integer NOT NULL, 229 | "SandikId" bigint, 230 | "KullaniciId" bigint, 231 | "GecerliOySayisi" integer, 232 | "GecersizOySayisi" integer, 233 | "ToplamSecmenSayisi" integer 234 | ); 235 | 236 | 237 | ALTER TABLE public."SandikDurumu" OWNER TO postgres; 238 | 239 | -- 240 | -- Name: SandikDurumu_Id_seq; Type: SEQUENCE; Schema: public; Owner: postgres 241 | -- 242 | 243 | CREATE SEQUENCE public."SandikDurumu_Id_seq" 244 | AS integer 245 | START WITH 1 246 | INCREMENT BY 1 247 | NO MINVALUE 248 | NO MAXVALUE 249 | CACHE 1; 250 | 251 | 252 | ALTER TABLE public."SandikDurumu_Id_seq" OWNER TO postgres; 253 | 254 | -- 255 | -- Name: SandikDurumu_Id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres 256 | -- 257 | 258 | ALTER SEQUENCE public."SandikDurumu_Id_seq" OWNED BY public."SandikDurumu"."Id"; 259 | 260 | 261 | -- 262 | -- Name: Sandiklar; Type: TABLE; Schema: public; Owner: postgres 263 | -- 264 | 265 | CREATE TABLE public."Sandiklar" ( 266 | "Id" bigint NOT NULL, 267 | "SandikNo" integer DEFAULT 0 NOT NULL, 268 | "MahalleId" integer 269 | ); 270 | 271 | 272 | ALTER TABLE public."Sandiklar" OWNER TO postgres; 273 | 274 | -- 275 | -- Name: Sandiklar_Id_seq; Type: SEQUENCE; Schema: public; Owner: postgres 276 | -- 277 | 278 | CREATE SEQUENCE public."Sandiklar_Id_seq" 279 | START WITH 1 280 | INCREMENT BY 1 281 | NO MINVALUE 282 | NO MAXVALUE 283 | CACHE 1; 284 | 285 | 286 | ALTER TABLE public."Sandiklar_Id_seq" OWNER TO postgres; 287 | 288 | -- 289 | -- Name: Sandiklar_Id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres 290 | -- 291 | 292 | ALTER SEQUENCE public."Sandiklar_Id_seq" OWNED BY public."Sandiklar"."Id"; 293 | 294 | 295 | -- 296 | -- Name: Sehirler; Type: TABLE; Schema: public; Owner: postgres 297 | -- 298 | 299 | CREATE TABLE public."Sehirler" ( 300 | "Id" integer NOT NULL, 301 | "SehirAdi" character varying(50) DEFAULT ''::character varying NOT NULL 302 | ); 303 | 304 | 305 | ALTER TABLE public."Sehirler" OWNER TO postgres; 306 | 307 | -- 308 | -- Name: Sehirler_Id_seq; Type: SEQUENCE; Schema: public; Owner: postgres 309 | -- 310 | 311 | CREATE SEQUENCE public."Sehirler_Id_seq" 312 | AS integer 313 | START WITH 1 314 | INCREMENT BY 1 315 | NO MINVALUE 316 | NO MAXVALUE 317 | CACHE 1; 318 | 319 | 320 | ALTER TABLE public."Sehirler_Id_seq" OWNER TO postgres; 321 | 322 | -- 323 | -- Name: Sehirler_Id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres 324 | -- 325 | 326 | ALTER SEQUENCE public."Sehirler_Id_seq" OWNED BY public."Sehirler"."Id"; 327 | 328 | 329 | -- 330 | -- Name: Sonuclar; Type: TABLE; Schema: public; Owner: postgres 331 | -- 332 | 333 | CREATE TABLE public."Sonuclar" ( 334 | "Id" integer NOT NULL, 335 | "KullaniciId" bigint, 336 | "SandikId" bigint, 337 | "AdayId" integer, 338 | "OySayisi" integer 339 | ); 340 | 341 | 342 | ALTER TABLE public."Sonuclar" OWNER TO postgres; 343 | 344 | -- 345 | -- Name: Sonuclar_Id_seq; Type: SEQUENCE; Schema: public; Owner: postgres 346 | -- 347 | 348 | CREATE SEQUENCE public."Sonuclar_Id_seq" 349 | AS integer 350 | START WITH 1 351 | INCREMENT BY 1 352 | NO MINVALUE 353 | NO MAXVALUE 354 | CACHE 1; 355 | 356 | 357 | ALTER TABLE public."Sonuclar_Id_seq" OWNER TO postgres; 358 | 359 | -- 360 | -- Name: Sonuclar_Id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres 361 | -- 362 | 363 | ALTER SEQUENCE public."Sonuclar_Id_seq" OWNED BY public."Sonuclar"."Id"; 364 | 365 | 366 | -- 367 | -- Name: Tutanaklar; Type: TABLE; Schema: public; Owner: postgres 368 | -- 369 | 370 | CREATE TABLE public."Tutanaklar" ( 371 | "Id" bigint NOT NULL, 372 | "SandikId" bigint, 373 | "KullaniciId" bigint, 374 | "Resim" character varying(300), 375 | "GonderilmeTarihi" timestamp without time zone, 376 | "OnayliMi" boolean, 377 | "OnayTarihi" timestamp without time zone, 378 | "OnaylayanId" bigint 379 | ); 380 | 381 | 382 | ALTER TABLE public."Tutanaklar" OWNER TO postgres; 383 | 384 | -- 385 | -- Name: Tutanaklar_Id_seq; Type: SEQUENCE; Schema: public; Owner: postgres 386 | -- 387 | 388 | CREATE SEQUENCE public."Tutanaklar_Id_seq" 389 | START WITH 1 390 | INCREMENT BY 1 391 | NO MINVALUE 392 | NO MAXVALUE 393 | CACHE 1; 394 | 395 | 396 | ALTER TABLE public."Tutanaklar_Id_seq" OWNER TO postgres; 397 | 398 | -- 399 | -- Name: Tutanaklar_Id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres 400 | -- 401 | 402 | ALTER SEQUENCE public."Tutanaklar_Id_seq" OWNED BY public."Tutanaklar"."Id"; 403 | 404 | 405 | -- 406 | -- Name: __EFMigrationsHistory; Type: TABLE; Schema: public; Owner: postgres 407 | -- 408 | 409 | CREATE TABLE public."__EFMigrationsHistory" ( 410 | "MigrationId" character varying(150) NOT NULL, 411 | "ProductVersion" character varying(32) NOT NULL 412 | ); 413 | 414 | 415 | ALTER TABLE public."__EFMigrationsHistory" OWNER TO postgres; 416 | 417 | -- 418 | -- Name: Adaylar Id; Type: DEFAULT; Schema: public; Owner: postgres 419 | -- 420 | 421 | ALTER TABLE ONLY public."Adaylar" ALTER COLUMN "Id" SET DEFAULT nextval('public."Adaylar_Id_seq"'::regclass); 422 | 423 | 424 | -- 425 | -- Name: Ilceler Id; Type: DEFAULT; Schema: public; Owner: postgres 426 | -- 427 | 428 | ALTER TABLE ONLY public."Ilceler" ALTER COLUMN "Id" SET DEFAULT nextval('public."Ilceler_Id_seq"'::regclass); 429 | 430 | 431 | -- 432 | -- Name: Kullanicilar Id; Type: DEFAULT; Schema: public; Owner: postgres 433 | -- 434 | 435 | ALTER TABLE ONLY public."Kullanicilar" ALTER COLUMN "Id" SET DEFAULT nextval('public."Kullanicilar_Id_seq"'::regclass); 436 | 437 | 438 | -- 439 | -- Name: Mahalleler Id; Type: DEFAULT; Schema: public; Owner: postgres 440 | -- 441 | 442 | ALTER TABLE ONLY public."Mahalleler" ALTER COLUMN "Id" SET DEFAULT nextval('public."Mahalleler_Id_seq"'::regclass); 443 | 444 | 445 | -- 446 | -- Name: Oturumlar Id; Type: DEFAULT; Schema: public; Owner: postgres 447 | -- 448 | 449 | ALTER TABLE ONLY public."Oturumlar" ALTER COLUMN "Id" SET DEFAULT nextval('public."Oturumlar_Id_seq"'::regclass); 450 | 451 | 452 | -- 453 | -- Name: SandikDurumu Id; Type: DEFAULT; Schema: public; Owner: postgres 454 | -- 455 | 456 | ALTER TABLE ONLY public."SandikDurumu" ALTER COLUMN "Id" SET DEFAULT nextval('public."SandikDurumu_Id_seq"'::regclass); 457 | 458 | 459 | -- 460 | -- Name: Sandiklar Id; Type: DEFAULT; Schema: public; Owner: postgres 461 | -- 462 | 463 | ALTER TABLE ONLY public."Sandiklar" ALTER COLUMN "Id" SET DEFAULT nextval('public."Sandiklar_Id_seq"'::regclass); 464 | 465 | 466 | -- 467 | -- Name: Sehirler Id; Type: DEFAULT; Schema: public; Owner: postgres 468 | -- 469 | 470 | ALTER TABLE ONLY public."Sehirler" ALTER COLUMN "Id" SET DEFAULT nextval('public."Sehirler_Id_seq"'::regclass); 471 | 472 | 473 | -- 474 | -- Name: Sonuclar Id; Type: DEFAULT; Schema: public; Owner: postgres 475 | -- 476 | 477 | ALTER TABLE ONLY public."Sonuclar" ALTER COLUMN "Id" SET DEFAULT nextval('public."Sonuclar_Id_seq"'::regclass); 478 | 479 | 480 | -- 481 | -- Name: Tutanaklar Id; Type: DEFAULT; Schema: public; Owner: postgres 482 | -- 483 | 484 | ALTER TABLE ONLY public."Tutanaklar" ALTER COLUMN "Id" SET DEFAULT nextval('public."Tutanaklar_Id_seq"'::regclass); 485 | 486 | 487 | -- 488 | -- Data for Name: Adaylar; Type: TABLE DATA; Schema: public; Owner: postgres 489 | -- 490 | 491 | COPY public."Adaylar" ("Id", "Ad", "Ad2", "Partisi", "Ittifaki", "Soyad") FROM stdin; 492 | 1 Mikail Deneme AKP Milli Tekin 493 | \. 494 | 495 | 496 | -- 497 | -- Data for Name: Ilceler; Type: TABLE DATA; Schema: public; Owner: postgres 498 | -- 499 | 500 | COPY public."Ilceler" ("Id", "SehirId", "IlceAdi") FROM stdin; 501 | \. 502 | 503 | 504 | -- 505 | -- Data for Name: Kullanicilar; Type: TABLE DATA; Schema: public; Owner: postgres 506 | -- 507 | 508 | COPY public."Kullanicilar" ("Id", "Ad", "Ad2", "Soyad", "TcNo", "Email", "TelNo", "Durum", "KayitTarihi", "KullaniciPuani", "MahalleId", "RolId") FROM stdin; 509 | \. 510 | 511 | 512 | -- 513 | -- Data for Name: Mahalleler; Type: TABLE DATA; Schema: public; Owner: postgres 514 | -- 515 | 516 | COPY public."Mahalleler" ("Id", "IlceId", "MahalleAdi") FROM stdin; 517 | \. 518 | 519 | 520 | -- 521 | -- Data for Name: Oturumlar; Type: TABLE DATA; Schema: public; Owner: postgres 522 | -- 523 | 524 | COPY public."Oturumlar" ("Id", "KullaniciId", "OturumZamani", "OturumIp", "OturumTarayicisi") FROM stdin; 525 | \. 526 | 527 | 528 | -- 529 | -- Data for Name: Roller; Type: TABLE DATA; Schema: public; Owner: postgres 530 | -- 531 | 532 | COPY public."Roller" ("Id", "RolAdi", "Haklari") FROM stdin; 533 | \. 534 | 535 | 536 | -- 537 | -- Data for Name: SandikDurumu; Type: TABLE DATA; Schema: public; Owner: postgres 538 | -- 539 | 540 | COPY public."SandikDurumu" ("Id", "SandikId", "KullaniciId", "GecerliOySayisi", "GecersizOySayisi", "ToplamSecmenSayisi") FROM stdin; 541 | \. 542 | 543 | 544 | -- 545 | -- Data for Name: Sandiklar; Type: TABLE DATA; Schema: public; Owner: postgres 546 | -- 547 | 548 | COPY public."Sandiklar" ("Id", "SandikNo", "MahalleId") FROM stdin; 549 | \. 550 | 551 | 552 | -- 553 | -- Data for Name: Sehirler; Type: TABLE DATA; Schema: public; Owner: postgres 554 | -- 555 | 556 | COPY public."Sehirler" ("Id", "SehirAdi") FROM stdin; 557 | \. 558 | 559 | 560 | -- 561 | -- Data for Name: Sonuclar; Type: TABLE DATA; Schema: public; Owner: postgres 562 | -- 563 | 564 | COPY public."Sonuclar" ("Id", "KullaniciId", "SandikId", "AdayId", "OySayisi") FROM stdin; 565 | \. 566 | 567 | 568 | -- 569 | -- Data for Name: Tutanaklar; Type: TABLE DATA; Schema: public; Owner: postgres 570 | -- 571 | 572 | COPY public."Tutanaklar" ("Id", "SandikId", "KullaniciId", "Resim", "GonderilmeTarihi", "OnayliMi", "OnayTarihi", "OnaylayanId") FROM stdin; 573 | \. 574 | 575 | 576 | -- 577 | -- Data for Name: __EFMigrationsHistory; Type: TABLE DATA; Schema: public; Owner: postgres 578 | -- 579 | 580 | COPY public."__EFMigrationsHistory" ("MigrationId", "ProductVersion") FROM stdin; 581 | \. 582 | 583 | 584 | -- 585 | -- Name: Adaylar_Id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres 586 | -- 587 | 588 | SELECT pg_catalog.setval('public."Adaylar_Id_seq"', 1, true); 589 | 590 | 591 | -- 592 | -- Name: Ilceler_Id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres 593 | -- 594 | 595 | SELECT pg_catalog.setval('public."Ilceler_Id_seq"', 1, false); 596 | 597 | 598 | -- 599 | -- Name: Kullanicilar_Id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres 600 | -- 601 | 602 | SELECT pg_catalog.setval('public."Kullanicilar_Id_seq"', 1, false); 603 | 604 | 605 | -- 606 | -- Name: Mahalleler_Id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres 607 | -- 608 | 609 | SELECT pg_catalog.setval('public."Mahalleler_Id_seq"', 1, false); 610 | 611 | 612 | -- 613 | -- Name: Oturumlar_Id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres 614 | -- 615 | 616 | SELECT pg_catalog.setval('public."Oturumlar_Id_seq"', 1, false); 617 | 618 | 619 | -- 620 | -- Name: SandikDurumu_Id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres 621 | -- 622 | 623 | SELECT pg_catalog.setval('public."SandikDurumu_Id_seq"', 1, false); 624 | 625 | 626 | -- 627 | -- Name: Sandiklar_Id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres 628 | -- 629 | 630 | SELECT pg_catalog.setval('public."Sandiklar_Id_seq"', 1, false); 631 | 632 | 633 | -- 634 | -- Name: Sehirler_Id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres 635 | -- 636 | 637 | SELECT pg_catalog.setval('public."Sehirler_Id_seq"', 1, false); 638 | 639 | 640 | -- 641 | -- Name: Sonuclar_Id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres 642 | -- 643 | 644 | SELECT pg_catalog.setval('public."Sonuclar_Id_seq"', 1, false); 645 | 646 | 647 | -- 648 | -- Name: Tutanaklar_Id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres 649 | -- 650 | 651 | SELECT pg_catalog.setval('public."Tutanaklar_Id_seq"', 1, false); 652 | 653 | 654 | -- 655 | -- Name: __EFMigrationsHistory PK___EFMigrationsHistory; Type: CONSTRAINT; Schema: public; Owner: postgres 656 | -- 657 | 658 | ALTER TABLE ONLY public."__EFMigrationsHistory" 659 | ADD CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY ("MigrationId"); 660 | 661 | 662 | -- 663 | -- Name: Adaylar PK_public.Adaylar; Type: CONSTRAINT; Schema: public; Owner: postgres 664 | -- 665 | 666 | ALTER TABLE ONLY public."Adaylar" 667 | ADD CONSTRAINT "PK_public.Adaylar" PRIMARY KEY ("Id"); 668 | 669 | 670 | -- 671 | -- Name: Ilceler PK_public.Ilceler; Type: CONSTRAINT; Schema: public; Owner: postgres 672 | -- 673 | 674 | ALTER TABLE ONLY public."Ilceler" 675 | ADD CONSTRAINT "PK_public.Ilceler" PRIMARY KEY ("Id"); 676 | 677 | 678 | -- 679 | -- Name: Kullanicilar PK_public.Kullanicilar; Type: CONSTRAINT; Schema: public; Owner: postgres 680 | -- 681 | 682 | ALTER TABLE ONLY public."Kullanicilar" 683 | ADD CONSTRAINT "PK_public.Kullanicilar" PRIMARY KEY ("Id"); 684 | 685 | 686 | -- 687 | -- Name: Mahalleler PK_public.Mahalleler; Type: CONSTRAINT; Schema: public; Owner: postgres 688 | -- 689 | 690 | ALTER TABLE ONLY public."Mahalleler" 691 | ADD CONSTRAINT "PK_public.Mahalleler" PRIMARY KEY ("Id"); 692 | 693 | 694 | -- 695 | -- Name: Oturumlar PK_public.Oturumlar; Type: CONSTRAINT; Schema: public; Owner: postgres 696 | -- 697 | 698 | ALTER TABLE ONLY public."Oturumlar" 699 | ADD CONSTRAINT "PK_public.Oturumlar" PRIMARY KEY ("Id"); 700 | 701 | 702 | -- 703 | -- Name: Roller PK_public.Roller; Type: CONSTRAINT; Schema: public; Owner: postgres 704 | -- 705 | 706 | ALTER TABLE ONLY public."Roller" 707 | ADD CONSTRAINT "PK_public.Roller" PRIMARY KEY ("Id"); 708 | 709 | 710 | -- 711 | -- Name: SandikDurumu PK_public.SandikDurumu; Type: CONSTRAINT; Schema: public; Owner: postgres 712 | -- 713 | 714 | ALTER TABLE ONLY public."SandikDurumu" 715 | ADD CONSTRAINT "PK_public.SandikDurumu" PRIMARY KEY ("Id"); 716 | 717 | 718 | -- 719 | -- Name: Sandiklar PK_public.Sandiklar; Type: CONSTRAINT; Schema: public; Owner: postgres 720 | -- 721 | 722 | ALTER TABLE ONLY public."Sandiklar" 723 | ADD CONSTRAINT "PK_public.Sandiklar" PRIMARY KEY ("Id"); 724 | 725 | 726 | -- 727 | -- Name: Sehirler PK_public.Sehirler; Type: CONSTRAINT; Schema: public; Owner: postgres 728 | -- 729 | 730 | ALTER TABLE ONLY public."Sehirler" 731 | ADD CONSTRAINT "PK_public.Sehirler" PRIMARY KEY ("Id"); 732 | 733 | 734 | -- 735 | -- Name: Sonuclar PK_public.Sonuclar; Type: CONSTRAINT; Schema: public; Owner: postgres 736 | -- 737 | 738 | ALTER TABLE ONLY public."Sonuclar" 739 | ADD CONSTRAINT "PK_public.Sonuclar" PRIMARY KEY ("Id"); 740 | 741 | 742 | -- 743 | -- Name: Tutanaklar PK_public.Tutanaklar; Type: CONSTRAINT; Schema: public; Owner: postgres 744 | -- 745 | 746 | ALTER TABLE ONLY public."Tutanaklar" 747 | ADD CONSTRAINT "PK_public.Tutanaklar" PRIMARY KEY ("Id"); 748 | 749 | 750 | -- 751 | -- Name: Ilceler_IX_SehirId; Type: INDEX; Schema: public; Owner: postgres 752 | -- 753 | 754 | CREATE INDEX "Ilceler_IX_SehirId" ON public."Ilceler" USING btree ("SehirId"); 755 | 756 | 757 | -- 758 | -- Name: Kullanicilar_IX_MahalleId; Type: INDEX; Schema: public; Owner: postgres 759 | -- 760 | 761 | CREATE INDEX "Kullanicilar_IX_MahalleId" ON public."Kullanicilar" USING btree ("MahalleId"); 762 | 763 | 764 | -- 765 | -- Name: Kullanicilar_IX_RolId; Type: INDEX; Schema: public; Owner: postgres 766 | -- 767 | 768 | CREATE INDEX "Kullanicilar_IX_RolId" ON public."Kullanicilar" USING btree ("RolId"); 769 | 770 | 771 | -- 772 | -- Name: Mahalleler_IX_IlceId; Type: INDEX; Schema: public; Owner: postgres 773 | -- 774 | 775 | CREATE INDEX "Mahalleler_IX_IlceId" ON public."Mahalleler" USING btree ("IlceId"); 776 | 777 | 778 | -- 779 | -- Name: Oturumlar_IX_KullaniciId; Type: INDEX; Schema: public; Owner: postgres 780 | -- 781 | 782 | CREATE INDEX "Oturumlar_IX_KullaniciId" ON public."Oturumlar" USING btree ("KullaniciId"); 783 | 784 | 785 | -- 786 | -- Name: SandikDurumu_IX_KullaniciId; Type: INDEX; Schema: public; Owner: postgres 787 | -- 788 | 789 | CREATE INDEX "SandikDurumu_IX_KullaniciId" ON public."SandikDurumu" USING btree ("KullaniciId"); 790 | 791 | 792 | -- 793 | -- Name: SandikDurumu_IX_SandikId; Type: INDEX; Schema: public; Owner: postgres 794 | -- 795 | 796 | CREATE INDEX "SandikDurumu_IX_SandikId" ON public."SandikDurumu" USING btree ("SandikId"); 797 | 798 | 799 | -- 800 | -- Name: Sandiklar_IX_MahalleId; Type: INDEX; Schema: public; Owner: postgres 801 | -- 802 | 803 | CREATE INDEX "Sandiklar_IX_MahalleId" ON public."Sandiklar" USING btree ("MahalleId"); 804 | 805 | 806 | -- 807 | -- Name: Sonuclar_IX_AdayId; Type: INDEX; Schema: public; Owner: postgres 808 | -- 809 | 810 | CREATE INDEX "Sonuclar_IX_AdayId" ON public."Sonuclar" USING btree ("AdayId"); 811 | 812 | 813 | -- 814 | -- Name: Sonuclar_IX_KullaniciId; Type: INDEX; Schema: public; Owner: postgres 815 | -- 816 | 817 | CREATE INDEX "Sonuclar_IX_KullaniciId" ON public."Sonuclar" USING btree ("KullaniciId"); 818 | 819 | 820 | -- 821 | -- Name: Sonuclar_IX_SandikId; Type: INDEX; Schema: public; Owner: postgres 822 | -- 823 | 824 | CREATE INDEX "Sonuclar_IX_SandikId" ON public."Sonuclar" USING btree ("SandikId"); 825 | 826 | 827 | -- 828 | -- Name: Tutanaklar_IX_KullaniciId; Type: INDEX; Schema: public; Owner: postgres 829 | -- 830 | 831 | CREATE INDEX "Tutanaklar_IX_KullaniciId" ON public."Tutanaklar" USING btree ("KullaniciId"); 832 | 833 | 834 | -- 835 | -- Name: Tutanaklar_IX_OnaylayanId; Type: INDEX; Schema: public; Owner: postgres 836 | -- 837 | 838 | CREATE INDEX "Tutanaklar_IX_OnaylayanId" ON public."Tutanaklar" USING btree ("OnaylayanId"); 839 | 840 | 841 | -- 842 | -- Name: Tutanaklar_IX_SandikId; Type: INDEX; Schema: public; Owner: postgres 843 | -- 844 | 845 | CREATE INDEX "Tutanaklar_IX_SandikId" ON public."Tutanaklar" USING btree ("SandikId"); 846 | 847 | 848 | -- 849 | -- Name: Ilceler FK_public.Ilceler_public.Sehirler_SehirId; Type: FK CONSTRAINT; Schema: public; Owner: postgres 850 | -- 851 | 852 | ALTER TABLE ONLY public."Ilceler" 853 | ADD CONSTRAINT "FK_public.Ilceler_public.Sehirler_SehirId" FOREIGN KEY ("SehirId") REFERENCES public."Sehirler"("Id"); 854 | 855 | 856 | -- 857 | -- Name: Kullanicilar FK_public.Kullanicilar_public.Mahalleler_MahalleId; Type: FK CONSTRAINT; Schema: public; Owner: postgres 858 | -- 859 | 860 | ALTER TABLE ONLY public."Kullanicilar" 861 | ADD CONSTRAINT "FK_public.Kullanicilar_public.Mahalleler_MahalleId" FOREIGN KEY ("MahalleId") REFERENCES public."Mahalleler"("Id"); 862 | 863 | 864 | -- 865 | -- Name: Kullanicilar FK_public.Kullanicilar_public.Roller_RolId; Type: FK CONSTRAINT; Schema: public; Owner: postgres 866 | -- 867 | 868 | ALTER TABLE ONLY public."Kullanicilar" 869 | ADD CONSTRAINT "FK_public.Kullanicilar_public.Roller_RolId" FOREIGN KEY ("RolId") REFERENCES public."Roller"("Id"); 870 | 871 | 872 | -- 873 | -- Name: Mahalleler FK_public.Mahalleler_public.Ilceler_IlceId; Type: FK CONSTRAINT; Schema: public; Owner: postgres 874 | -- 875 | 876 | ALTER TABLE ONLY public."Mahalleler" 877 | ADD CONSTRAINT "FK_public.Mahalleler_public.Ilceler_IlceId" FOREIGN KEY ("IlceId") REFERENCES public."Ilceler"("Id"); 878 | 879 | 880 | -- 881 | -- Name: Oturumlar FK_public.Oturumlar_public.Kullanicilar_KullaniciId; Type: FK CONSTRAINT; Schema: public; Owner: postgres 882 | -- 883 | 884 | ALTER TABLE ONLY public."Oturumlar" 885 | ADD CONSTRAINT "FK_public.Oturumlar_public.Kullanicilar_KullaniciId" FOREIGN KEY ("KullaniciId") REFERENCES public."Kullanicilar"("Id"); 886 | 887 | 888 | -- 889 | -- Name: SandikDurumu FK_public.SandikDurumu_public.Kullanicilar_KullaniciId; Type: FK CONSTRAINT; Schema: public; Owner: postgres 890 | -- 891 | 892 | ALTER TABLE ONLY public."SandikDurumu" 893 | ADD CONSTRAINT "FK_public.SandikDurumu_public.Kullanicilar_KullaniciId" FOREIGN KEY ("KullaniciId") REFERENCES public."Kullanicilar"("Id"); 894 | 895 | 896 | -- 897 | -- Name: SandikDurumu FK_public.SandikDurumu_public.Sandiklar_SandikId; Type: FK CONSTRAINT; Schema: public; Owner: postgres 898 | -- 899 | 900 | ALTER TABLE ONLY public."SandikDurumu" 901 | ADD CONSTRAINT "FK_public.SandikDurumu_public.Sandiklar_SandikId" FOREIGN KEY ("SandikId") REFERENCES public."Sandiklar"("Id"); 902 | 903 | 904 | -- 905 | -- Name: Sandiklar FK_public.Sandiklar_public.Mahalleler_MahalleId; Type: FK CONSTRAINT; Schema: public; Owner: postgres 906 | -- 907 | 908 | ALTER TABLE ONLY public."Sandiklar" 909 | ADD CONSTRAINT "FK_public.Sandiklar_public.Mahalleler_MahalleId" FOREIGN KEY ("MahalleId") REFERENCES public."Mahalleler"("Id"); 910 | 911 | 912 | -- 913 | -- Name: Sonuclar FK_public.Sonuclar_public.Adaylar_AdayId; Type: FK CONSTRAINT; Schema: public; Owner: postgres 914 | -- 915 | 916 | ALTER TABLE ONLY public."Sonuclar" 917 | ADD CONSTRAINT "FK_public.Sonuclar_public.Adaylar_AdayId" FOREIGN KEY ("AdayId") REFERENCES public."Adaylar"("Id"); 918 | 919 | 920 | -- 921 | -- Name: Sonuclar FK_public.Sonuclar_public.Kullanicilar_KullaniciId; Type: FK CONSTRAINT; Schema: public; Owner: postgres 922 | -- 923 | 924 | ALTER TABLE ONLY public."Sonuclar" 925 | ADD CONSTRAINT "FK_public.Sonuclar_public.Kullanicilar_KullaniciId" FOREIGN KEY ("KullaniciId") REFERENCES public."Kullanicilar"("Id"); 926 | 927 | 928 | -- 929 | -- Name: Sonuclar FK_public.Sonuclar_public.Sandiklar_SandikId; Type: FK CONSTRAINT; Schema: public; Owner: postgres 930 | -- 931 | 932 | ALTER TABLE ONLY public."Sonuclar" 933 | ADD CONSTRAINT "FK_public.Sonuclar_public.Sandiklar_SandikId" FOREIGN KEY ("SandikId") REFERENCES public."Sandiklar"("Id"); 934 | 935 | 936 | -- 937 | -- Name: Tutanaklar FK_public.Tutanaklar_public.Kullanicilar_KullaniciId; Type: FK CONSTRAINT; Schema: public; Owner: postgres 938 | -- 939 | 940 | ALTER TABLE ONLY public."Tutanaklar" 941 | ADD CONSTRAINT "FK_public.Tutanaklar_public.Kullanicilar_KullaniciId" FOREIGN KEY ("KullaniciId") REFERENCES public."Kullanicilar"("Id"); 942 | 943 | 944 | -- 945 | -- Name: Tutanaklar FK_public.Tutanaklar_public.Kullanicilar_OnaylayanId; Type: FK CONSTRAINT; Schema: public; Owner: postgres 946 | -- 947 | 948 | ALTER TABLE ONLY public."Tutanaklar" 949 | ADD CONSTRAINT "FK_public.Tutanaklar_public.Kullanicilar_OnaylayanId" FOREIGN KEY ("OnaylayanId") REFERENCES public."Kullanicilar"("Id"); 950 | 951 | 952 | -- 953 | -- Name: Tutanaklar FK_public.Tutanaklar_public.Sandiklar_SandikId; Type: FK CONSTRAINT; Schema: public; Owner: postgres 954 | -- 955 | 956 | ALTER TABLE ONLY public."Tutanaklar" 957 | ADD CONSTRAINT "FK_public.Tutanaklar_public.Sandiklar_SandikId" FOREIGN KEY ("SandikId") REFERENCES public."Sandiklar"("Id"); 958 | 959 | 960 | -- 961 | -- PostgreSQL database dump complete 962 | -- 963 | 964 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Açık Seçim 2 | Projeyi çalıştırmadan önce AcikSecim/AcikSecim.WebApi/Models/WebApiDbContext.cs sınıfı içerisinde yer alan database konfigurasyonunu kendi userID ve password değerleriniz ile değiştirin 3 | 4 | Sonrasında Nuget Package Manager Console içerisinde "update database" komutunu çalıştırmanız yeterlidir 5 | 6 | Postgresql kuralım öncelikle, terminalimize aşağıdaki komutu yazıyoruz; 7 | 8 | docker run -p 5432:5432 --name postg -e POSTGRES_PASSWORD=123456 -d postgres 9 | 10 | Sonrasında ise oluşan postgresql containerimizin yerel ip adresi ile api-client içerisindeki ip adresi ile aynı mı diye aşağıdaki komut ile kontrol ediyoruz; 11 | 12 | docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' postg 13 | 14 | Eğer sonuç 172.17.0.2 ise direkt olarak client build alma kısmına geçebilirsiniz. 15 | 16 | Sonuç 172.17.0.2 değilse; AcikSecim.WebApi/Models/WebApiDbContext.cs içerisindeki 17 | 18 | "User ID=postgres; Password=123456; Server=172.17.0.2; Port=5432; Database=AcikSecimDB; Integrated Security=true;"); 19 | 20 | Server = 172.17.0.2 olan IP adresini docker inspect komutundan aldığımız cevapla değiştiriyoruz. Artık build almaya hazırız. 21 | 22 | AcikSecim.WebApi klasörünün içerisinden 23 | 24 | docker build -t aspnetapp . 25 | 26 | komutuyla "aspnetapp" docker image oluşacaktır. Yine aynı şekilde 27 | 28 | docker run --name aspapi -d -p 80:80 aspnetapp:latest 29 | 30 | komutuyla konteyner daemonize olarak çalışacaktır. 31 | 32 | # Varolan konteynerı güncellemek 33 | 34 | Kaynak kodları üzerinde düzenleme yaptıysanız ve **değişiklikler github reposuna yansıdıysa** aşağıdaki kodla oluşturduğunuz konteyneri silip üstteki adımları takip etmeniz yeterlidir. 35 | 36 | docker container rm aspapi 37 | 38 | **Kaynak kodundaki değişikliker henüz sadece yerelde değiştiyse** 39 | 40 | Üsttekinden tek farklı olarak clone yapmadan build almanızdır, şu şekilde; 41 | 42 | docker container rm aspapi 43 | 44 | ile konteynerimizi siliyoruz ve AcikSecim.WebApi klasörünün içerisine girip 45 | 46 | docker build -t aspnetapp . 47 | 48 | yeni imaj oluşturuyoruz. 49 | 50 | docker run --name aspapi -d -p 80:80 aspnetapp:latest 51 | 52 | yazarak konteynerimizin güncel halini görebiliriz. 53 | 54 | # Konteyner loglarını görüntülemek 55 | 56 | docker container logs postg 57 | 58 | komutu ile postgresql konteynerının logları, 59 | 60 | docker container logs aspapi 61 | 62 | komutu ile asp.net api konteynerimizin loglarını görüntüleyebiliriz. 63 | 64 | # Docker konteynerı içerisine veritabanı yapısını yüklemek 65 | 66 | DBYapisi klasörüne girip aşağıdaki komutu terminalimizden işliyoruz. 67 | 68 | docker cp Backup postg:/ 69 | 70 | Sonrasında aşağıdaki komutu da girersek veritabanı yapımız sisteme işlenmiş olacaktır. 71 | 72 | docker exec postg psql -U postgres -d AcikSecimDB -1 -f Backup 73 | --------------------------------------------------------------------------------