Cohorts
  • Discover
  • About Us
  • Blog
  • Patika.dev
  • Web3

.Net Core

Tarihçe, .Net Framework vs .Net Core vs .Net5

.NET 5 Kurulumu
Visual Studio Code kurulumu

Http Protokolü
Restful Servisler
Restful vs Soap
JSON (JavaScript Object Notation)

Örnek Web Api Yaratmak

Startup ve Program Sınıfları
Ortam dosyaları

Controller Sınıfı
Route Kavramı
Action Methodlar
Okunabilir API tasarımı

Swagger Nedir? Nasıl Kullanılır?
Postman Nedir? Nasıl Kullanılır?
Api Debug Nasıl Yapılır?

Get ve GetById endpoint'lerinin yazılması
Put ve Post endpoint'lerinin yazılması
Delete endpoint'inin yazılması

İlişkisel ve NoSql Veritabanları
Table,Primary Key, Foreign Key Kavramları
Tablo İlişkileri

Temel SQL
ORM Nedir? ORM Araçları Nelerdir? Entity Framework Core'a Giriş
Örnek Projeye EF Core Dahil Etmek
DB Context kullanarak CRUD işlemler
Auto Increment ID kolonunun eklenmesi
Linq ile Crud İşlemler

Entity Kavramı
ViewModel ve Dto Kavramı
Ödev - Model Kullanımı
Ödev Çözümü - Model Kullanımı
AutoMapper

Modellerin Doğrulanması ve FluentValidation Kütüphanesi
Model Validasyonu - Ödev
Model Validasyonu - Ödev Çözümü

Middleware Kavramı
Custom Exception Middleware Yaratılmak

Dependency Nedir ?
Dependency Injection (DI) Kavramı
DI Container Kavramı
.NET Core DI Container (Services)
Projeye DI Container Kullanarak Logger Servis Eklemek

Pratik - Projeye Genre Controller ve Servislerin Eklenmesi

Ödev - Projeye Author Controller ve Servislerin Eklenmesi

Test Kavramı ve Çeşitleri
TDD (Test Driven Development) Nedir ?
Örnek Test Yazımı
Pratik - Command ve Validator Sınıflarının Testlerinin Yazılması

Ödev - Projenin eksik testlerinin tamamlanması

Token Bazlı Kimlik Doğrulama ve Access Token Kullanımı
Refresh Token Kullanımı

Proje Ödevi - Movie Store Uygulaması

Proje Ödevi 2 - Serbest Proje Seçimi

Entity Kavramı


Entity Framework içindeki bir entity esasında veritabanı tablosuyla eşleşen bir sınıftır. Bu sınıf, DbContext sınıfına DbSet <TEntity> türü özelliği olarak dahil edilmelidir.EF her entity sınıfını bir tabloyla ve bir entity sınıfın her özelliğini veritabanındaki bir tablo kolonuna eşler.


Örneğin, aşağıdaki Öğrenci ve Sınıf, okul uygulamasındaki alan sınıflarıdır.Örnek olarak aşağıdaki Student ve Grade sınıflarını düşünelim.


public class Student
{
    public int StudentID { get; set; }
    public string StudentName { get; set; }
    public DateTime? DateOfBirth { get; set; }
    public byte[]  Photo { get; set; }
    public decimal Height { get; set; }
    public float Weight { get; set; }
        
    public Grade Grade { get; set; }
}
public class Grade
{
    public int GradeId { get; set; }
    public string GradeName { get; set; }
    public string Section { get; set; }

    public ICollection<Student> Students { get; set; }
} 


SchoolDBContextadında da bir context'imiz olduğunu düşünelim. Student ve Grade sınıflarımızı DbSet<TEntity> formatında context'e göstermemiz gerekiyor. Ki Entity Framework DB tarafındaki hangi tabloyu code tarafındaki hangi sınıf ile eşleştireceğini bilsin.


public class SchoolContext : DbContext
{
    public SchoolContext()
    {

    }

    public DbSet<Student> Students { get; set; }
    public DbSet<Grade> Grades { get; set; }
}


Bu DBContext'e göre EF database üzerindeki aşağıdaki 2 tabloyu oluşturur.


EF Generates these tables


Bir entity sınıfında 2 tip property yani özellik bulunabilir. Bunlar:


  • Scalar Property: Primitive type olan field'lar olarak düşünebilirsiniz. Db de data tutan kolonlara karşılık gelir. Students tablosundan yola çıkarsak her bir skalar property için aşağıdaki gibi tablo kolonları oluşur.


  • Primitive Typed Properties


  • Navigation Property: Navigation Property bir entity ile başka bir entity arasında olan ilişkiyi temsil eder.
  • Refererence Navigation Property: Entity nin başka bir entity'e yi property olarak barındırması anlamına gelir. Entity framework bu 2 tabloyu birbirine Foreign Key ile bağlar.



public class Student
{
    // scalar properties
    public int StudentID { get; set; }
    public string StudentName { get; set; }
    public DateTime? DateOfBirth { get; set; }
    public byte[]  Photo { get; set; }
    public decimal Height { get; set; }
    public float Weight { get; set; }
        
    //reference navigation property
    public Grade Grade { get; set; }
}


Yukarıdaki örnek kodu incelersek Student entity si içerisinde Grade entity sinin var olduğunu görüyoruz. Bu demek oluyor ki Grade Student için bir referans tablo. EF Student tablosu içerisinde GradeId ismiyle bir FK tutarak bu iki tabloyu birbirine bağlar.


  • Reference Navigation Property



Previous
Next

Lesson discussion

Swap insights and ask questions about “.Net Core”.

Enroll to participate
Start the course to unlock the discussion. Enrolling helps us keep conversations relevant to learners.
Cohorts
WebsiteDiscoverBlogPatika.devRise In
CoursesCircleRustSoliditySolanaWeb3 FundamentalsBlockchain Basics
CompanyAbout UsTerms of UsePrivacy PolicyGDPR NoticeCookies
Don't miss any update!

Disclaimer: The information, programs, and events provided on https://cohorts.patika.dev is strictly for upskilling and networking purposes related to the technical infrastructure of blockchain platforms. We do not provide financial or investment advice, nor do we make any representations regarding the value, profitability, or future price of any blockchain or cryptocurrency. Users are encouraged to conduct their own research and consult with licensed financial professionals before engaging in any investment activities. https://cohorts.patika.dev disclaims any responsibility for financial decisions made by users based on the information provided here.

© 2026 Cohorts, All rights reserved