현재 구조는 Controller -> Service -> DbContext -> SQL Server 이다 이번에는 Repository를 추가해서 (Presentation Layer)Controller -> (Business Layer)Service -> (Data Access Layer)Repository -> (Database)Entity Framework Core / SQL Server 로 바꾸겠다. 각 계층의 역할은 다음과 같다 Controller : 요청을 받고 결과 반환 Service : 비즈니스 로직 처리 Repository : DB 접근 DbContext : SQL 실행 및 DB 연결 Model : DB 데이터 표현 DTO : 계층 간 데이터 전달 DTO 만들기 DTO란? (Data Transfer Object)DTO는 데이터 전달을 위한 객체이다. DB 테이블 구조를 그대로 브라우저에 전달하지 않고 필요한 데이터만 전달할 수 있다.
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile