Microsoft .NET
-
[ASP.Net Core API] File Upload API / 파일 업로드 APIMicrosoft .NET/ASP.Net & ASP.Net Core 2021. 2. 3. 11:23
파일 저장 경로, 저장 파일 명, 파일을 필수값으로 받아서 서버에 저장하는 API API that receives file storage path, save file name, and file as required values and saves them to the server #region Upload /// /// 파일 업로드 /// /// 파일 저장 경로(서버) /// 파일 저장 이름(서버) /// 파일(클라이언트) /// //[EnableCors("CORS")] [HttpPost("upload")] public string Upload( [Required][FromForm(Name = "path")]string path, [Required][FromForm(Name = "filename")]str..
-
[WPF] 지역화 (다중 언어)Microsoft .NET/WPF 2020. 12. 7. 18:43
본 예제는 resource에 국가별 언어를 미리 등록해두고 설정(Language Culture)에 따라 표출되는 언어가 변경되도록 하는 예제입니다. Git - https://github.com/jeseok-Mun/WPF_Example_MultiLanguage 참고 PC 언어 코드 System.Globalization.CultureInfo.CurrentCulture 국가별 언어 코드(Language Culture) 더보기 Code Name af Afrikaans af-ZA Afrikaans (South Africa) ar Arabic ar-AE Arabic (U.A.E.) ar-BH Arabic (Bahrain) ar-DZ Arabic (Algeria) ar-EG Arabic (Egypt) ar-IQ Ar..
-
[ASP.Net Core API] Startup.cs에서 설정해야 할 것들 ( Swagger, CORS, formatFilter({format?}) )Microsoft .NET/ASP.Net & ASP.Net Core 2020. 11. 10. 10:51
nuget에서 Swashbuckle.AspNetCore 설치 빌드 일시 기록 버전 더보기 1. 프로젝트 파일 *.csproj를 메모장으로 열기 2. AssemblyVersion를 1.0.*로 변경 3. Deterministic를 false로 추가 등록 1.0.* false public class Startup { #region CORS / Version -> DateTime readonly string MyAllowSpecificOrigins = "CORS"; /// 버전 정보를 넣으면 빌드 시간을 반환. public System.DateTime Get_BuildDateTime(System.Version version = null) { // 주.부.빌드.수정 // 주 버전 Major Number // 부..
-
[ASP.Net Core API] API 주소 설정Microsoft .NET/ASP.Net & ASP.Net Core 2020. 9. 17. 22:29
Controller 주소 및 API 주소 일괄 설정 - Controller Class 상단에 표기 ControllerClass 명칭 과 API함수 명칭을 자동으로 주소로 사용 : [Route("[controller]/[action]")] Ex) sample/member 더보기 [Route("[controller]/[action]")] [ApiController] public class sampleController : ControllerBase { //// GET: sample/member [HttpGet] public string member() { return "Virtualgiraffe"; } } Controller 주소 설정 - Controller Class 상단에 표기 Controller Cla..
-
[ASP.Net Core API] 프로젝트 생성 및 기본 세팅Microsoft .NET/ASP.Net & ASP.Net Core 2020. 9. 16. 21:16
추천 게시물 REST API와 RESTful 및 CRUD개념 1. 프로젝트 생성 더보기 프레임워크 : ASP.NET Core 2.1 (Docker 사용 시에 2.1 버전 권장) 2. 컨트롤러 생성 및 호출 더보기 Proejct - Cotrollers 폴더 우클릭 - 추가 - 컨트롤러 빌드 - "host + /api/sample"로 접속 3. API 생성 더보기 생성된 Controller(sampleController)에 함수를 정의 public string GetMember() { return "Virtualgiraffe"; } 메소드(Method) (HttpPost, HttpGet, HttpPut, HttpDelete) 중 선택 입력 [HttpGet] public string GetMember() { ..
-
[ASP.Net Core API] REST API와 RESTful 및 CRUD개념Microsoft .NET/ASP.Net & ASP.Net Core 2020. 9. 16. 17:28
RESTful이란? 'REST API'를 제공하는 서비스를 'RESTful'한 API라고 말할 수 있으며, REST 규칙을 따르는 서비스를 'RESTful'이라 칭한다. CRUD란? Create, Read, Update, Delete 4개의 기능을 칭하는 용어다. 이름 SQL 조작 METHOD Create INSERT 생성 POST Read SELECT 읽기 GET Update UPDATE 갱신 PUT Delete DELETE 삭제 DELETE REST API REpresentational State Transfer API 나타낸 + 상태 + 전달 = 전달 상태를 나타낸 API REST API는 API의 전달 규칙을 칭한다. REST API 구성 자원(resource) - URI 행위(verb) - ME..
-
[C#] ColorDialog (색상 선택 컨트롤, 다이얼로그)Microsoft .NET/C# 2020. 7. 14. 18:49
//색상 선택 다이얼로그 //참조 추가 : System.Windows.Forms //참조 추가 : System.Drawing //참조 추가 : System.Windows.Media using (System.Windows.Forms.ColorDialog colorDialog = new System.Windows.Forms.ColorDialog() { AllowFullOpen = true, FullOpen = true}) { if (colorDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { System.Windows.Media.Color color = new System.Windows.Media.Color() { A = colorDialog.Co..