본문 바로가기
728x90
반응형

전체 글303

ASP.NET MVC] Sub Select Option 동적 변경 cshtml 소속 경기도지사 강원도지사 담당자명 branch select가 변경될 때, 소속 담당자리스트를 가져와서 option을 동적으로 생성해주도록 하자. $(document).ready(function () { $("#branch").change(function () { fn_setBranchEmpList($(this).val(),'담당자명'); }); }); function fn_setBranchEmpList(selected_branch, selected_emp) { var jsonData = JSON.stringify({ branch: selected_branch }); $.ajax({ type: 'POST', url: "/Member/GetEmpListByBranchName", contentT.. 2022. 5. 27.
ASP.NET MVC] Response.ContentType을 사용한 엑셀 다운로드 ExcelHelper.cs public class ExcelHelper { protected IQueryable _source = null; public ExcelHelper(IQueryable source) { _source = source; } public virtual void ExcelExport() { int viewHiddenCheck = 0; HttpContext.Current.Response.Clear(); HttpContext.Current.Response.AddHeader("content-disposition", string.Format("attachment; filename={0}", "Book1.xls")); HttpContext.Current.Response.ContentEncod.. 2022. 5. 27.
.NET 6 API with Azure Pipeline] 3. Trigger, Unit Test Task 출처 : https://dotnetplaybook.com/build-test-and-deploy-a-rest-api-with-azure-devops/ Trigger Pipeline은 트리거를 사용하여, 자동으로 실행된다. GitHub CI 트리거란? CI(연속통합) 트리거는 지정된 branch에 push하면 파이프라인이 실행된다. azire-pipelines.yml파일을 보면 아래와 같이 main branch에 trigger가 세팅된 것을 확인할 수 있다. trigger: - main 그러면 소스를 수정해서 push를 해보고 pipeline이 실행되는지 확인해보자. 파일을 수정하고 push를 한 다음, pipeline을 확인해보면 아래와 같이 실행된 것을 확인할 수 있다. Task yaml파일을 수정해서.. 2022. 5. 27.
.NET 6 API with Azure Pipeline] 2. Azure Pipeline, Free tier 설정 출처 : https://dotnetplaybook.com/build-test-and-deploy-a-rest-api-with-azure-devops/ Azure Pipeline을 세팅해보자. https://dev.azure.com/ 1. 프로젝트를 생성한다. 2. 생성한 프로젝트를 선택해서, Pipeline을 생성한다. Connect : GitHub를 선택한다. Select : repository를 선택한다. Configure : ASP.NET Core를 선택한다. Review : azure-pipelines.yml 파일을 확인하고 Save and run 버튼을 클릭한다. GitHub repository에 azure-pipelines.yml파일이 자동으로 추가된다. 호스팅 병력작업의 개수가 없기 때문에,.. 2022. 5. 27.
.NET Core] Request Pipeline - Run, Map, Use .NET Core 어플리케이션은 Program.cs 파일에 어플리케이션 시작 코드를 포함한다. Program.cs 구성요소 1. 서비스 추가 2. HTTP Request Pipeline 구성요소 Program.cs 소스 예시) var builder = WebApplication.CreateBuilder(args); // Add services to the container. //컨테이너에 서비스를 추가한다. //DI프레임워크가 런타임에 이 서비스의 인스턴스를 제공한다. builder.Services.AddRazorPages(); builder.Services.AddControllersWithViews(); var app = builder.Build(); // Configure the HTTP reques.. 2022. 5. 23.
.NET 6 API with Azure Pipeline] 1. WEB API, Unit Test 프로젝트 생성 출처 : https://dotnetplaybook.com/build-test-and-deploy-a-rest-api-with-azure-devops/ CI/CD Pipeline Continuous integration -> Continuous delivery -> Continuous deployment Plan -> Code -> Build -> Test -> Release -> Deploy -> Operate -> Monitor Code를 GitHub에 올리면, Azure DevOps에서 전달받아 코드를 빌드하고, Unit Test를 실행하고, Release하기 위해 package한다. 그 다음 Azure에 Deploy된다. GitHub대신에 Azure DevOps나 GitLab 사용이 가능하고, Az.. 2022. 5. 19.
728x90
반응형