분류 전체보기 (511) 썸네일형 리스트형 Generic Repository Specification Pattern - Adding Sorting One of the drawbacks about using the specification pattern is that we lose some of the functions provided by Entity Framework. Sorting the result is one of them and we will see how we can manually create the feature with the specification pattern. Creating a Generic Repository Pattern Relational DB - Getting Data including Data from Other Entities (Generic Repository Pattern) Let's see how we ca.. 지네릭 레포지토리 스페시피케이션 패턴 - 정렬기능 추가하기 스페시피케이션 패턴의 단점 중 하나는 콘텍스트에서 기본제공하는 기능의 일부를 사용할 수 없다는 점입니다. 스페시피케이션 패턴에 정렬기능을 추가하는 방법을 보겠습니다. 지네릭 레포지토리 패턴 설정하기 관계형 데이터 불러오기 (참조 데이터 포함) - 지네릭 레포지토리 패턴 엔티티프레임워크를 사용하여 관계형 테이블에서 참조하는 데이터를 포함하여 데이터를 불러오는 방법을 보겠습니다. 구현하기 애플리케이션 생성 .NET web-API 생성하기 개발도구 설치하기 .NET jin-co.tistory.com 스페시피케이션 인터페이스에 정렬을 위한 메서드를 추가 Expression OrderBy { get; } Expression OrderByDesc { get; } 스페시피케이션 클래스로 이동하여 추가한 메서드를 구현.. 에이피아이 - 에러응답 형식 통일하기 각 에러의 종류마다 반환되는 에러 메시지에 포함된 내용과 형식이 다릅니다. 이 글에서는 반환되는 에러 메시지의 형식을 통일하여 프론트엔드 개발자가 보다 쉽게 활용가능하도록 하는 방법을 보겠습니다 먼저 몇몇 에러메시지의 응답 형식을 보겠습니다 구현하기 1) .NET MVC 컨트롤러 베이스 에러코드 MVC 컨트롤러의 에러코드 반환 메서드의 경우 매개변수를 통해 원하는 형식의 에러 메시지를 반환가능합니다. 에이피아이 프로젝트 안에 에러를 처리하는 폴더를 만들고 공통된 형식으로 에러메시지를 반환해 줄 클래스를 생성합니다 생성된 클래스에 아래와 같이 컨스트럭터, 속성, 메서드를 추가하고 // constructor public ErrorRes(int statusCode, string massage = null) {.. Google Search Google browser constantly crawls web sites to collect and store the data on a site. The process is called indexing and Google uses this data to match what the users search to show relative sites. So making for Google to index your site easier is the first step for your site to be on top of the search result and we will see how. Things that Affects the Indexing 1. URL URL should be human readable.. SEO (Multi-Lingual Blog Indexing) After making a multi-lingual blog on tstory. I was looking for a way to improve search results for each content when I came across how to help Google to identify pages with the same content but in different languages. Implementation The implementation is not hard. We just have to add link tags with 'rel="alternate"' on every page that is related. Insert the two-character language code for the 'l.. Creating a Unified Error Response Format Error messages returned from each error have differenct formats and this makes it hard for front developers to work with. We will see how we can solve this problem. Let's see first what I meant about the different format of each errors Implementation 1) For .NET MVC Controller Based Errors Error code methods that MVC controller provides can take a format as a parameter Create a folder to handle .. 검색 엔진최적화 (다국어 블로그) 다국어블로그를 만들고 검색 엔진최적화 부분을 알아보던 중 마침 구글의 경우 동일한 콘텐츠를 여러 언어버전으로 생성한 경우 인덱싱과 검색결과를 보여줄 때 반영할 수 있는 기능이 있어 소개해 드리고자 합니다 구현하기 구현은 아래 태그를 동일한 콘텐츠를 포함하는 모든 페이지에 삽입합니다. 'lang_code'는 두 자리 언어코드를 'url'은 해당하는 페이지 주소를 사용합니다. 예시 보기 티스토리에서 만든 다국어 블로그를 가지고 해당 기능을 구현해 보겠습니다. 관리자 화면에서 '블로그 관리' -> '스킨편집' -> 'HTML 편집' -> 'HTML' 순으로 이동하여 아래처럼 'alternate' 링크 태그를 삽입합니다. 주소 없이 링크만 삽입하는 이유는 구현된 다국어블로그 각 페이지마다 링크를 삽입하지 않고 .. Swagger When we create a Web API project a package called 'Swagger' is automatically added. Swagger is a tool that provides API documentation like PostMan. Whenever we run the API project it runs and shows us the endpoints and the results that each endpoint returns HTML 삽입 미리보기할 수 없는 소스 이전 1 ··· 19 20 21 22 23 24 25 ··· 64 다음