{"id":20633030,"url":"https://github.com/yenilikci/.net-core-entity-framework-exercises","last_synced_at":"2026-05-16T11:31:29.536Z","repository":{"id":117873987,"uuid":"309495814","full_name":"yenilikci/.Net-Core-Entity-Framework-Exercises","owner":"yenilikci","description":null,"archived":false,"fork":false,"pushed_at":"2020-11-02T21:25:55.000Z","size":7571,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T18:07:53.413Z","etag":null,"topics":["create","delete","entity-framework-core","provider","read","sqlite","update"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yenilikci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-02T21:10:03.000Z","updated_at":"2020-11-02T21:27:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f87b0e2-04ae-4f58-83a1-7ad833b8b9ee","html_url":"https://github.com/yenilikci/.Net-Core-Entity-Framework-Exercises","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yenilikci/.Net-Core-Entity-Framework-Exercises","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yenilikci%2F.Net-Core-Entity-Framework-Exercises","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yenilikci%2F.Net-Core-Entity-Framework-Exercises/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yenilikci%2F.Net-Core-Entity-Framework-Exercises/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yenilikci%2F.Net-Core-Entity-Framework-Exercises/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yenilikci","download_url":"https://codeload.github.com/yenilikci/.Net-Core-Entity-Framework-Exercises/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yenilikci%2F.Net-Core-Entity-Framework-Exercises/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33100800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["create","delete","entity-framework-core","provider","read","sqlite","update"],"created_at":"2024-11-16T14:18:18.300Z","updated_at":"2026-05-16T11:31:29.510Z","avatar_url":"https://github.com/yenilikci.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# .Net-Core-Entity-Framework-Exercises\n\n## SQLite Provider\n\n**Yeni Core Console projesi oluşturma:**\n\n`dotnet new console`\n\n**SQLite provider:**\n\n`dotnet add package Microsoft.EntityFrameworkCore.Sqlite`\n\n**.Net Core araçları için:**\n\n`dotnet tool install --global dotnet-ef`\n\n**Araç kontrolü için:**\n\n`dotnet ef -h`\n\n**SQLite database için:**\n\nhttps://sqlitebrowser.org/\n\n**Entity Sınıfları:**\n\n```csharp\n    public class Articles\n    {\n        //Primary Key (Id veya \u003ctypne_name\u003eId yani ArticlesId)\n        /*opsiyonel;\n        [Key]\n        public int YaziId {get; set;}\n        */\n        public int Id { get; set; }\n        [MaxLength(150)] //maksimium 150 karakter olsun\n        [Required] //zorunlu alan\n        //using System.ComponentModel.DataAnnotations;\n        public string Title { get; set; }\n        public string Text {get; set;}\n    }\n\n    public class Category\n    {\n        public int CategoryId {get; set;}\n        public string Name {get; set;}\n    }\n```\n\n**Context Sınıfı:**\n\n```csharp\n public class BlogContext:DbContext \n //using Microsoft.EntityFrameworkCore;\n    {\n        public DbSet\u003cArticle\u003e Articles { get; set; }\n        public DbSet\u003cCategory\u003e Categories {get; set;}\n\n        //Veritabanı Ayarları\n        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)\n        {\n            optionsBuilder.UseSqlite(\"Data Source=blog.db\"); \n\t\t\t//veritabanını belirttik\n        }\n    }\n```\n\n**Veritabanı Oluşturma:**\n\nMigration İşlemi : \n-\t Önce Entity Framework Core tasarım bileşenini eklememiz lazım:\n\n\t`dotnet add package Microsoft.EntityFrameworkCore.Design`\n\t\n- veritabanımızı oluşturalım adım 1 - (migration oluşturma işlemi):\n\n\t`dotnet ef migrations add IlkDatabase`\n\t* oluşturulanları silmek için: `dotnet ef migrations remove`\n\t\n\tsonuç : Migrations klasörü altında 20201102174708_IlkDatabase.cs dosyamızı oluşturdu\n\t\n- veritabanımızı oluşturalım adım 2 - (migrationın uygulanması)\n\n\t`dotnet ef database update`\n\t\nBu veritabanı dosyasını SQLiteBrowser ile görüntüleyebiliriz.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyenilikci%2F.net-core-entity-framework-exercises","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyenilikci%2F.net-core-entity-framework-exercises","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyenilikci%2F.net-core-entity-framework-exercises/lists"}