<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[PanachaiNY - Medium]]></title>
        <description><![CDATA[Tip developer - Medium]]></description>
        <link>https://medium.com/panachainy?source=rss----2d583aa65c97---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>PanachaiNY - Medium</title>
            <link>https://medium.com/panachainy?source=rss----2d583aa65c97---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 13 Nov 2026 21:11:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/panachainy" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[[.Net Core 2.1] เชื่อมต่อ EntityFramework Core แบบง่ายๆ (Db First)]]></title>
            <link>https://medium.com/panachainy/net-core-2-1-%E0%B9%80%E0%B8%8A%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%A1%E0%B8%95%E0%B9%88%E0%B8%AD-entityframework-core-%E0%B9%81%E0%B8%9A%E0%B8%9A%E0%B8%87%E0%B9%88%E0%B8%B2%E0%B8%A2%E0%B9%86-e2158efb9b95?source=rss----2d583aa65c97---4</link>
            <guid isPermaLink="false">https://medium.com/p/e2158efb9b95</guid>
            <category><![CDATA[net-core]]></category>
            <category><![CDATA[entity-framework-core]]></category>
            <category><![CDATA[net-core-2]]></category>
            <dc:creator><![CDATA[PanachaiNY]]></dc:creator>
            <pubDate>Thu, 14 Jun 2018 15:32:26 GMT</pubDate>
            <atom:updated>2019-06-12T15:14:16.073Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*SzFV7lQnabm2YEq7J9Rs7w.png" /></figure><h3>CREATE PROJECT</h3><p>สร้างโปรเจคชื่อ NetCore_webapi_efcore บน CMD หรือ PowerShell</p><pre>dotnet new webapi</pre><p><em>หากมีปัญหาให้ทำการติดตั้ง .NetCore สะก่อน </em><a href="https://www.microsoft.com/net/download/windows"><em>https://www.microsoft.com/net/download/windows</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*YNVQsufUBAal5du1rvC02Q.png" /><figcaption>ไฟล์ทั้งหมดภายใน Project</figcaption></figure><h3>ADD NUGET</h3><p>เพิ่ม nuget ภายในไฟล์ NetCore_webapi_efcore.csproj</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fe3eb83e43c6fa79b1101325421c9467/href">https://medium.com/media/fe3eb83e43c6fa79b1101325421c9467/href</a></iframe><p>แล้วทำการ Refresh โปรเจคครั้งนึงด้วย</p><pre>dotnet restore</pre><h3>CONNECT DATABASE</h3><p>ในที่นี้เจ้าของบล็อคจะทำการเชื่อมต่อกับ Database ภายในเครื่องตัวเอง (Local) โดยมี Database ชื่อ TrainWebAPI อยู่เรียบร้อยแล้ว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*prz09dI_m29DtoyNhbS94w.png" /><figcaption>Database ตัวอย่างภายในเครื่อง</figcaption></figure><p>ทำการพิมพ์คำสั่งด้านล่างไปที่ Terminal ของ Project</p><pre>dotnet ef dbcontext scaffold &quot;Server=Localhost;Database=TrainWebAPI;Trusted_Connection=True;&quot; Microsoft.EntityFrameworkCore.SqlServer -o Models/DB</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L-mmUVysZnvCQrWSHtLJng.png" /><figcaption>ภาพแสดงผลลัพท์หลังจากพิมคำสั่งบน Terminal</figcaption></figure><p>ระบบจะทำการสร้าง Model ข้อมูลตาม Database ที่เราสร้างไว้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*I4QjjwSr8SllYNDEVgV2HA.png" /></figure><h3>ความรู้ที่ควรมี</h3><ul><li>การเขียนโปรแกรมระดับนึง</li><li>การเขียนโปรแกรมแบบ MVC</li></ul><p>Example : <a href="https://github.com/panachai/NetcoreEntityFrameworkCore">https://github.com/panachai/NetcoreEntityFrameworkCore</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2158efb9b95" width="1" height="1" alt=""><hr><p><a href="https://medium.com/panachainy/net-core-2-1-%E0%B9%80%E0%B8%8A%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%A1%E0%B8%95%E0%B9%88%E0%B8%AD-entityframework-core-%E0%B9%81%E0%B8%9A%E0%B8%9A%E0%B8%87%E0%B9%88%E0%B8%B2%E0%B8%A2%E0%B9%86-e2158efb9b95">[.Net Core 2.1] เชื่อมต่อ EntityFramework Core แบบง่ายๆ (Db First)</a> was originally published in <a href="https://medium.com/panachainy">PanachaiNY</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[SQL SERVER 2017] Backup and Restore Database]]></title>
            <link>https://medium.com/panachainy/sql-server-2017-restore-database-d1cfb422fe4d?source=rss----2d583aa65c97---4</link>
            <guid isPermaLink="false">https://medium.com/p/d1cfb422fe4d</guid>
            <category><![CDATA[sql-server-2017]]></category>
            <category><![CDATA[sql-management-studio]]></category>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[PanachaiNY]]></dc:creator>
            <pubDate>Thu, 14 Jun 2018 15:32:18 GMT</pubDate>
            <atom:updated>2018-06-13T07:22:22.853Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N-OBW9pgWBrv1I2LJuRWuw.png" /></figure><p>บางครั้งอาจมีการย้าย Database จากโน๊ตบุค ไป PC ที่บ้าน หรืออะไรก็ตามแต่จะมีการ Backup and Restore Database เพื่อโอนย้ายข้อมูล (ในกรณีที่ไม่ได้ใช้ Server จริง)</p><h3>Backup Database</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uaAR4H6G_9u8UjX0ds21wA.png" /></figure><ol><li>คลิกขวาที่ Database -&gt; Tasks -&gt; Back Up…</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4JCUtZKgz_766ZrhG2i_jA.png" /></figure><p>2. คลิก OK</p><p>เป็นอันเสร็จสิ้นขั้นตอนการ Backup ครับ</p><h3>Restore Database</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*FTxNmXqMDrsZSwgqL1R29w.png" /></figure><ol><li>ทำการคลิกขวาที่ Database เลือก Restore Database…</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8jzhn4g1rQordQAlhCqLqg.png" /></figure><p>2. เลือกไฟล์จาก Device และคลิกที่ …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*hCKwH0K7qqUZzbS33tOByg.png" /></figure><p>3. คลิก Add</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xg96WupjMTTPVesD54QohQ.png" /><figcaption>Copy Path File</figcaption></figure><p>4. แล้วนำไฟล์ .bak ที่เตรียมไว้มาวางในตำแหน่งที่ Copy</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*riozgA5UFGRQxXfiIXAOoQ.png" /></figure><p>4.1 เมื่อวางเสร็จแล้ว คลิกปุ่ม Refresh หนึ่งครั้ง แล้วคลิกเลือกไฟล์ .bak</p><p>แล้วทำการคลิก OK ตามขั้นตอนเป็นอันเสร็จสิ้น</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/419/1*WoJbZVzirb_lXIDwUs42mw.png" /><figcaption>Database ที่ได้จากการ Restore Database</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1cfb422fe4d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/panachainy/sql-server-2017-restore-database-d1cfb422fe4d">[SQL SERVER 2017] Backup and Restore Database</a> was originally published in <a href="https://medium.com/panachainy">PanachaiNY</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[SQL SERVER 2017] ติดตั้ง SQL Server 2017 and SQL Server Management Studio 17.7]]></title>
            <link>https://medium.com/panachainy/sql-server-2017-setup-for-develop-local-c1016b0598e2?source=rss----2d583aa65c97---4</link>
            <guid isPermaLink="false">https://medium.com/p/c1016b0598e2</guid>
            <category><![CDATA[studio-management]]></category>
            <category><![CDATA[sql-server-2017]]></category>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[PanachaiNY]]></dc:creator>
            <pubDate>Thu, 14 Jun 2018 15:32:09 GMT</pubDate>
            <atom:updated>2018-06-13T06:08:37.316Z</atom:updated>
            <content:encoded><![CDATA[<h3>Setup For Develop (Local)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*78CUxMg91n8yYMNP5PXqnQ.png" /><figcaption>ดาวน์โหลดไฟล์ SQLServer2017-SSEI-Dev</figcaption></figure><blockquote>SQL Server 2017 SSEI-Dev (ตัว SQL Server)</blockquote><blockquote>Download : <a href="https://www.microsoft.com/en-us/sql-server/sql-server-downloads">https://www.microsoft.com/en-us/sql-server/sql-server-downloads</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*dZHJ_3OqRQCMa5LBwb4EZQ.png" /><figcaption>ดาวน์โหลดไฟล์ SSMS-Setup-ENU</figcaption></figure><blockquote>SQL Server Management Studio SSMS (ตัว Management)</blockquote><blockquote>Download : <a href="https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017">https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*kOULxGCyuNEGFcH8oNDt8A.png" /><figcaption>ไฟล์ที่ใช้ในการทดสอบ</figcaption></figure><p>วิธีการติดตั้งเจ้าของบล็อคขอให้ลงรายละเอียดนะครับ (Next เนอะ)</p><h3>เข้าใช้งาน</h3><p>เมื่อติดตั้งเสร็จเข้าใช้งานได้ที่ตัว Microsoft SQL Server Management Studio 17</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*QwTaSzulVBdLjsgIi8_20A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*nZYvIx14Uq2toR-6kWNpkw.png" /><figcaption>หน้าตาโปรแกรม</figcaption></figure><p>ทำการเชื่อมต่อเข้า SQL Server ภายในเครื่องของเรา (Local)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/223/1*8672s5317FCJYMwpPZXv9A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*A4R0P5p5bEgjzRRNaGyoWA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/371/1*XGdoyT7AWlmnlALrMYoSKg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*gWqcbWXwcatuJSJwlLe_bg.png" /></figure><p>เราก็จะสามารถใช้งาน SQL Server 2017 ได้แล้วครับ</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1016b0598e2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/panachainy/sql-server-2017-setup-for-develop-local-c1016b0598e2">[SQL SERVER 2017] ติดตั้ง SQL Server 2017 and SQL Server Management Studio 17.7</a> was originally published in <a href="https://medium.com/panachainy">PanachaiNY</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Angular 6] แก้ปัญหา Firebase Deploy บน Angular 6]]></title>
            <link>https://medium.com/panachainy/angular-6-%E0%B9%81%E0%B8%81%E0%B9%89%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2-firebase-deploy-%E0%B8%9A%E0%B8%99-angular-6-97437ccefd83?source=rss----2d583aa65c97---4</link>
            <guid isPermaLink="false">https://medium.com/p/97437ccefd83</guid>
            <category><![CDATA[firebasehosting]]></category>
            <category><![CDATA[angular-cli]]></category>
            <category><![CDATA[resolve]]></category>
            <category><![CDATA[angular-6]]></category>
            <category><![CDATA[firebase]]></category>
            <dc:creator><![CDATA[PanachaiNY]]></dc:creator>
            <pubDate>Thu, 14 Jun 2018 15:31:43 GMT</pubDate>
            <atom:updated>2020-02-16T15:17:37.131Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*UdS2_Qr3Wc9z2GRtOIjCsw.png" /><figcaption>ภาพหลังจาก Setup ทุกอย่างถูกต้องแต่ดันไม่เข้าหน้า Index</figcaption></figure><p>หลังจากที่เจ้าของบล็อคได้ลองกลับมาเล่นเจ้า Angular หลังจากห่างหายไปสักพักก็พบว่าเจ้า Angular 6 มีปัญหาอย่างนึงที่สะกิดใจเล็กน้อยนั้นก็คือ</p><h4>เมื่อทำการ init firebase เข้า Project Angular 6 ของเราแล้ว เมื่อใช้คำสั่ง deploy firebase ระบบดันไม่พบหน้า index ของโปรแกรมของเรา</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*seGy4OpUJ4My7P6QNVuKXQ.jpeg" /><figcaption>รายละเอียดคำสั่ง firebase deploy</figcaption></figure><p>จากภาพจะเห็นว่า เมื่อใช้คำสั่ง <em>`firebase deploy`</em> แล้วจะมีแจ้งเตือน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*cwSemHmBcio2viSOnDol5w.jpeg" /></figure><p>นั้นคือระบบไม่สามารถหาไฟล์ index.html ได้ เพราะอะไรนะเหรอ ?</p><p>จากที่ทุกๆท่านทราบดีว่า Angular 5 จะต้องทำการ deploy โปรเจคที่ได้มีการ build แล้วภายในโฟลเดอร์ dist<strong> </strong>ที่จะสร้างขึ้นมาเมื่อใช้คำสั่ง `<em>ng build` </em>ซึ่งภายในโฟลเดอร์ dist ของ Angular 5 และ Angular 6 นั้นแตกต่างกันอยู่นิดหน่อยตามภาพด้านล่าง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/1*sqnmcHs3IRdarQXVgfedxg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/269/1*mrFeMlNdyyhjyyQSnVGuJw.png" /><figcaption>ไฟล์ภายในโฟลเดอร์ dist บนโปรเจค Anular 5 และ Angular 6 ตามลำดับ</figcaption></figure><p>จะเห็นว่าภายในโฟลเดอร์ dist ของ Angular 6 จะมีโฟลเดอร์ชื่อโปรเจคเพิ่มเข้ามาด้วยนั้นเพราะว่า</p><h4>Angular 6 ได้มีฟีเจอร์ใหม่ที่เรียกว่า Workspace เข้ามาทำให้สามารถสร้าง Project ได้หลายตัวภายใน Workspace เดียว จึงได้มีการเพิ่มโฟลเดอร์ภายในโฟลเดอร์ dist เพื่อบอกว่าเป็นไฟล์ของโปรเจคใด</h4><h3>วิธีแก้</h3><p>ให้ทำการใช้คำสั่ง `<em>firebase init`</em> ซ้ำเพื่อทำการแก้ไข path ในการ public ไฟล์</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*1jnwGZpiGdkhcGNhqt7Xkg.png" /><figcaption>ขั้นตอนที่ต้องแก้ไข path</figcaption></figure><p>ให้พิมพ์ <em>dist/_projectname_</em> ลงไปในบรรทัดที่ถามถึงโฟลเดอร์ที่ต้องการอัพขึ้น hosting</p><p>เมื่อทำการแก้ไขเสร็จเรียบร้อยให้ลบโฟลเดอร์ dist ออกเพื่อล้างข้อมูล index.html ที่ firebase สร้างมาให้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/409/1*edanTVPJlJzntJ8taX2uUw.jpeg" /><figcaption>ลบโฟลเดอร์ dist</figcaption></figure><p>แล้วทำการใช้คำสั่ง <em>`ng build`</em> แล้วตามด้วย <em>`firebase deploy`</em> เป็นอันเสร็จ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HhRbqU5iUmUnPJxyXTileQ.jpeg" /><figcaption>เว็บบน hosting ของ firebase</figcaption></figure><h3>สรุป</h3><p>แค่ทำการแก้ path ตอน Firebase public งานของเราขึ้นเพราะ Angular 6 เพิ่มฟีเจอร์ Workspace ทำให้ path งานเปลี่ยนที่</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97437ccefd83" width="1" height="1" alt=""><hr><p><a href="https://medium.com/panachainy/angular-6-%E0%B9%81%E0%B8%81%E0%B9%89%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2-firebase-deploy-%E0%B8%9A%E0%B8%99-angular-6-97437ccefd83">[Angular 6] แก้ปัญหา Firebase Deploy บน Angular 6</a> was originally published in <a href="https://medium.com/panachainy">PanachaiNY</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Angular 6] แก้ปัญหาใช้งาน .map() ใน Service ไม่ได้]]></title>
            <link>https://medium.com/panachainy/angular-6-%E0%B9%81%E0%B8%81%E0%B9%89%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99-map-%E0%B9%83%E0%B8%99-service-%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B9%84%E0%B8%94%E0%B9%89-67084ba6b15d?source=rss----2d583aa65c97---4</link>
            <guid isPermaLink="false">https://medium.com/p/67084ba6b15d</guid>
            <category><![CDATA[angular-cli]]></category>
            <category><![CDATA[angular-6]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[angular-5]]></category>
            <dc:creator><![CDATA[PanachaiNY]]></dc:creator>
            <pubDate>Thu, 14 Jun 2018 15:31:33 GMT</pubDate>
            <atom:updated>2018-05-07T11:04:32.454Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*8j55EUVVSSw_MG1sWToEXQ.png" /><figcaption>ตัวอย่าง Code บน Service</figcaption></figure><p>ถ้าหากไม่สามารถใช้งาน .map ใน Service โดยที่ Import เข้ามาเรียบร้อยแล้ว</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/26528efef46ee851ad665fa260708a78/href">https://medium.com/media/26528efef46ee851ad665fa260708a78/href</a></iframe><p>แก้ไขโดยเข้า Terminal แล้วรัน `npm i — save rxjs-compat` คำสั่งตามภาพ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*tR13W7FUsVi-DjE61r1OMA.png" /><figcaption>ภาพ รันคำสั่งเพื่อเพิ่ม rxjs</figcaption></figure><p>เป็นอันเสร็จสิ้น</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/300e141a6aeeb28345ce0103d5d13b5d/href">https://medium.com/media/300e141a6aeeb28345ce0103d5d13b5d/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67084ba6b15d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/panachainy/angular-6-%E0%B9%81%E0%B8%81%E0%B9%89%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99-map-%E0%B9%83%E0%B8%99-service-%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B9%84%E0%B8%94%E0%B9%89-67084ba6b15d">[Angular 6] แก้ปัญหาใช้งาน .map() ใน Service ไม่ได้</a> was originally published in <a href="https://medium.com/panachainy">PanachaiNY</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[.NET CORE 2.1] เขียน Logging ด้วย Serilog]]></title>
            <link>https://medium.com/panachainy/net-core-2-1-%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99-logging-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-serilog-579b34188f61?source=rss----2d583aa65c97---4</link>
            <guid isPermaLink="false">https://medium.com/p/579b34188f61</guid>
            <category><![CDATA[serilog]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[net-core]]></category>
            <category><![CDATA[logs]]></category>
            <category><![CDATA[log4net]]></category>
            <dc:creator><![CDATA[PanachaiNY]]></dc:creator>
            <pubDate>Thu, 14 Jun 2018 15:30:53 GMT</pubDate>
            <atom:updated>2019-11-16T18:02:38.259Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ue7JhEksd5mNZ_srTrif_Q.png" /></figure><p>โดยปกติเจ้าของบล็อคเคยเขียน log ด้วย log4net ซึ่งเป็นที่นิยมมากๆใน ASP.NET (ดูจากยอดดาวน์โหลดก็รู้แล้ว) แต่วันนี้อยากจะลองอะไรแปลกๆบ้าง เพราะเห็นว่า Serilog สามารถเขียน log steamming ขึ้นบน Azure ได้ (เจ้าของบล็อคก็ไม่เคยเขียนหลอก) ก็เลยมาลองดูเจ้าตัวนี้บ้าง</p><p>โปรเจคใช้ตัวเดิมจาก : <a href="https://medium.com/@panachai.ny/net-core-2-1-%E0%B9%80%E0%B8%8A%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%A1%E0%B8%95%E0%B9%88%E0%B8%AD-entityframework-core-%E0%B9%81%E0%B8%9A%E0%B8%9A%E0%B8%87%E0%B9%88%E0%B8%B2%E0%B8%A2%E0%B9%86-e2158efb9b95">[.Net Core 2.1] เชื่อมต่อ EntityFramework Core แบบง่ายๆ</a></p><p><em>ref : </em><a href="https://www.nuget.org/packages/log4net/"><em>https://www.nuget.org/packages/log4net/</em></a></p><h3>ADD PACKAGE</h3><p>โดยเบื้องต้นจะตั้งเพิ่ม Package ทั้งหมด 3 ตัวด้วยกัน</p><p><em>: ด้านล่างเป็นเวอร์ชั่นที่ใช้ในการทดสอบ</em></p><pre>dotnet add package Serilog — version 2.7.2-dev-01005</pre><pre>dotnet add package Serilog.Sinks.File — version 4.0.1-dev-00796</pre><pre>dotnet add package Serilog.Extensions.Logging — version 2.0.2</pre><h3>SETTING PROJECT</h3><p>ต่อมาเข้าไปที่ไฟล์ Startup.cs ทำการเพิ่ม ILoggerFactory loggerFactory ที่ Parameter ของ Method Configure</p><p>และเพิ่ม Code ตามด้านล่างเข้าไป</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/db8fa016c760de1931112f7dc7b54a1b/href">https://medium.com/media/db8fa016c760de1931112f7dc7b54a1b/href</a></iframe><h4>อธิบาย</h4><ul><li>บรรทัด 5 : ทำการสร้างตำแหน่ง พร้อมระบุชื่อไฟล์ log</li><li>บรรทัด 6 : คำสั่งสร้างไฟล์ Log</li></ul><h3>USE</h3><p>ทำการเตรียมค่า ILogger ตัวอย่างโค๊ดด้านล่างครับ</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/405ea5fb07d7f495c06a043455314d21/href">https://medium.com/media/405ea5fb07d7f495c06a043455314d21/href</a></iframe><p>นำไปใช้ภายใต้ Class เดียวกัน</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4707e72cbb7fb61c8042076ef2634dfe/href">https://medium.com/media/4707e72cbb7fb61c8042076ef2634dfe/href</a></iframe><p>เป็นอันเสร็จสิ้นจ้าาาา</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5rDV5pvqT_K4cHNcWVtOcw.png" /><figcaption>ภาพตัวอย่างไฟล์ log ที่ได้</figcaption></figure><p><strong>Example (branch Serilog Complete) : </strong><a href="https://goo.gl/3Sgx3z"><strong>https://goo.gl/3Sgx3z</strong></a></p><p>ถ้าอยากได้แบบละเอียดยิบๆลองตามวาปได้เลย (.NET CORE 1.0 นะจ๊ะ)</p><p><em>credit : </em><a href="https://www.youtube.com/watch?v=Lyj7nRU-bCw"><em>https://www.youtube.com/watch?v=Lyj7nRU-bCw</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=579b34188f61" width="1" height="1" alt=""><hr><p><a href="https://medium.com/panachainy/net-core-2-1-%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99-logging-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-serilog-579b34188f61">[.NET CORE 2.1] เขียน Logging ด้วย Serilog</a> was originally published in <a href="https://medium.com/panachainy">PanachaiNY</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lesson 1 อัลกอริทึม (Algorithm) สำคัญยังไง ?]]></title>
            <link>https://medium.com/panachainy/lesson-1-%E0%B8%AD%E0%B8%B1%E0%B8%A5%E0%B8%81%E0%B8%AD%E0%B8%A3%E0%B8%B4%E0%B8%97%E0%B8%B6%E0%B8%A1-algorithm-%E0%B8%AA%E0%B8%B3%E0%B8%84%E0%B8%B1%E0%B8%8D%E0%B8%A2%E0%B8%B1%E0%B8%87%E0%B9%84%E0%B8%87-dd4839cbb42c?source=rss----2d583aa65c97---4</link>
            <guid isPermaLink="false">https://medium.com/p/dd4839cbb42c</guid>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[อัลกอริทึม]]></category>
            <dc:creator><![CDATA[PanachaiNY]]></dc:creator>
            <pubDate>Sat, 04 Nov 2017 19:56:54 GMT</pubDate>
            <atom:updated>2017-11-04T20:12:49.259Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*4WVxvzjiyu3mWcIFEMlZzg.png" /></figure><p>ถ้าพูดถึง Algorithm หลายคนคงคิดว่า “ยาก” แต่จริงๆแล้วมันอยู่รอบกายเรานี้เอง เช่น Algorithm การเดินไปร้านเกมส์</p><blockquote>ออกจากบ้าน -&gt; ผ่านสี่แยก -&gt; เลี้ยวขวา -&gt; เจอรูปปั้นแมว -&gt; โบกมือสองที -&gt; เดินต่อ 3ก้าว -&gt; ถึงร้านเกมส์</blockquote><p>จบการเกริ่น ต่อสาระ</p><h3>สาระ</h3><p>อัลกอริทึม คือ “หัวใจหลักของการเขียนโปรแกรม” การเขียนโปรแกรม เราจะต้องคิดออกมาเป็นลำดับขั้นก่อนการเขียนเสมอ เช่น</p><p>ต้องการจะเขียนโปรแกรมคำนวนพื้นที่สี่เหลี่ยมผืนผ้า</p><blockquote>ผู้ใช้ป้อนความกว้าง และยาว -&gt; โปรแกรมคำนวน -&gt; แสดงพื้นที่สี่เหลี่ยมผืนผ้า</blockquote><p>พูดง่ายๆก็คือ “อัลกอริทึมเป็นขั้นตอนการทำงานของโปรแกรม”</p><h3>ตัวอย่าง</h3><p>Algorithm การเดินไปโรงอาหาร</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*FmfshKCHrGNv6MuPhs2Hqg.png" /><figcaption>แผนผัง</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*x8IWN7SYc7M4sZTKfUq9_g.png" /><figcaption>การเดินแบบที่หนึ่ง</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*7ZpyKgT8WpzAskveVUxNOg.png" /><figcaption>การเดินแบบที่สอง</figcaption></figure><p>จากด้านบนจะเห็นว่า ไม่ว่าจะเลือกเดินแบบที่หนึ่ง หรือสอง ก็สามารถไปถึงได้เช่นกัน แต่ระยะเวลาที่ได้อาจต่างกัน</p><blockquote>Algorithm ไม่มีถูก ไม่มีผิด ถ้าหากผลลัพท์ที่ได้นั้นเหมือนกัน</blockquote><blockquote>Algorithm ที่ดีควรจะให้ผลลัพท์ที่ “ไวกว่า”</blockquote><h3>แบบทดสอบ</h3><p>จงเขียน Algorithm การเดินทางจากบ้าน ไปถึง มหาวิทยาลัย/โรงเรียน/ที่ทำงาน ที่ใดที่หนึ่ง</p><p>เมื่อเขียนเสร็จแล้วมาลองดูคำตอบกันว่าเป็นยังไง</p><h3>คำตอบ</h3><blockquote>หยิบใบวาปไปมหาวิทยาลัย -&gt; ใช้วาป -&gt; ถึงมหาวิทยาลัย</blockquote><h4><strong>ตึ๋งโป๊ะ</strong></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd4839cbb42c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/panachainy/lesson-1-%E0%B8%AD%E0%B8%B1%E0%B8%A5%E0%B8%81%E0%B8%AD%E0%B8%A3%E0%B8%B4%E0%B8%97%E0%B8%B6%E0%B8%A1-algorithm-%E0%B8%AA%E0%B8%B3%E0%B8%84%E0%B8%B1%E0%B8%8D%E0%B8%A2%E0%B8%B1%E0%B8%87%E0%B9%84%E0%B8%87-dd4839cbb42c">Lesson 1 อัลกอริทึม (Algorithm) สำคัญยังไง ?</a> was originally published in <a href="https://medium.com/panachainy">PanachaiNY</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[เริ่มต้นการเป็น Programmer ฉบับไม่มี Code]]></title>
            <link>https://medium.com/panachainy/%E0%B9%80%E0%B8%A3%E0%B8%B4%E0%B9%88%E0%B8%A1%E0%B8%95%E0%B9%89%E0%B8%99%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99-programmer-%E0%B8%89%E0%B8%9A%E0%B8%B1%E0%B8%9A%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B8%A1%E0%B8%B5-code-a54200518042?source=rss----2d583aa65c97---4</link>
            <guid isPermaLink="false">https://medium.com/p/a54200518042</guid>
            <dc:creator><![CDATA[PanachaiNY]]></dc:creator>
            <pubDate>Sun, 27 Aug 2017 04:55:49 GMT</pubDate>
            <atom:updated>2017-11-04T19:15:14.770Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*qMImPcQELQcqHeUZ3cL4VQ.png" /></figure><h3>ไม่ชอบคณิตศาสตร์ เขียนโปรแกรมได้ไหม ?</h3><p>ตอบเลยครับว่าได้ แต่จะทำได้ไม่สุด เพราะการเขียนโปรแกรมก็จะมีรากฐานมาจาก คณิตศาสตร์อยู่ดี กระบวนการคำนวนต่างๆก็มาจากคณิตศาสตร์ แต่สิ่งที่สำคัญกว่าคณิตศาสตร์ก็คือ Algorithm การคิดเป็นลำดับขั้น จะช่วยให้เราเขียนโปรแกรมได้ดียิ่งขึ้น</p><p>ซึ่งหากยังรักในการเขียนโปรแกรม อยากเรียนสายนี้ ในโลกของความจริงกระบวนการเขียนโปรแกรมไม่ได้มีแค่ Programmer แต่ยังประกอบไปด้วย Web Design, Computer System Analysis (SA), Support, Network, QA Engineer, Project Manager, Graphic Design, Data Science ฯลฯ ลองศึกษาในส่วนของอาชีพต่างๆ ที่อาจจะมีเพิ่มมาอีกในอนาคต และลองคิดทบทวนดูนะครับ</p><blockquote>ส่วนตัว อยากจะให้ลองเขียนโปรแกรมอย่างจริงจังก่อน สู้ให้สุด ทุ่มให้เต็มที่</blockquote><h3>ควรเริ่มต้นยังไงกับการเขียนโปรแกรม ?</h3><p>อันนี้ก็จะอยู่ที่คน แต่เจ้าของบล็อคจะเริ่มจากการเขียน Algorithm (กระบวนการคิด) ในการทำสิ่งต่างๆในชีวิตประจำวัน เช่น</p><blockquote>ตื่นนอน &gt; ลุกจากเตียง &gt; เดินไปห้องน้ำ &gt; อาบน้ำ &gt; ใส่เสื้อผ้า &gt; กินข้าวเช้า &gt; ออกนอกบ้าน</blockquote><p>การเขียนโปรแกรม ก็จะเป็นในรูปแบบนี้เช่นกัน</p><h3>อยากเริ่มต้น ลอง เขียน CODE ทำอย่างไร ?</h3><p>เจ้าของบล็อคได้เริ่มเขียน Code ตอนเรียนมหาวิทยาลัย แต่ถ้าอยากจะลองก่อน แนะนำเป็นภาษา Web เช่น HTML PHP CSS หาดูได้ตามเว็บสอนทั่วไป</p><p>แต่เจ้าของบล็อค เริ่มจากภาษา Java เขียนลง Platform Windows เพราะ อ.ให้เขียน (จริงๆนะ) เจ้าของบล็อคก็มองว่าเป็นเรื่องที่ดี เริ่มจากอะไรที่ยากๆ แล้วไปง่าย มันก็จะไปได้เร็ว</p><h3>ทำยังไงถึงจะรู้ว่าเราชอบทางไหน ?</h3><p>ง่ายนิดเดียวครับ (ที่เหลือยาก) คือการลองทำ ในส่วนแรกอยากจะให้ลองเริ่มต้นจากสิ่งที่ชอบ ไม่ว่าจะเป็นการลองอ่าน Code ใน Platform/ภาษา ต่างๆที่สนใจ ลอง ลอง แล้วก็ลองครับ ลองให้ครบทุกอย่างที่สนใจ แล้วเราจะมองเห็นทางเอง</p><h3>การเขียนโปรแกรมต้องเตรียมตัวอะไรบ้างสำหรับอนาคต ?</h3><p>สิ่งที่ต้องเตรียมตัว (เตรียมใจ) ในอนาคตนั้นก็คือความรู้ในวันนี้ อาจจะไม่สามารถใช้ได้ในอนาคต เพราะเทคโนโลยีบนโลกเราเปลี่ยนไปไวมาก วันนี้อาจจะใช้วิธีเขียนแบบนึงเป็นวิธีที่ดีที่สุด พรุ่งนี้อาจจะมีวิธีใหม่เข้ามาที่ดีกว่า เราก็ต้องศึกษาตามโลกให้ทัน จึงต้องมีการศึกษาอยู่ตลอดเวลา</p><blockquote>ทั้งหมดนี้เป็นความคิดเห็น ประสบการณ์ มุมมองของเจ้าของบล็อค ถ้าหากว่าเราชอบ เรารักอะไร อยากให้สู้ให้สุดตัวครับ</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a54200518042" width="1" height="1" alt=""><hr><p><a href="https://medium.com/panachainy/%E0%B9%80%E0%B8%A3%E0%B8%B4%E0%B9%88%E0%B8%A1%E0%B8%95%E0%B9%89%E0%B8%99%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99-programmer-%E0%B8%89%E0%B8%9A%E0%B8%B1%E0%B8%9A%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B8%A1%E0%B8%B5-code-a54200518042">เริ่มต้นการเป็น Programmer ฉบับไม่มี Code</a> was originally published in <a href="https://medium.com/panachainy">PanachaiNY</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[C#] เปลี่ยนคอมพิวเตอร์ให้เป็นเซิฟเวอร์ [วิธีตั้งค่า IIS บน Windows 10]]]></title>
            <link>https://medium.com/panachainy/%E0%B9%80%E0%B8%9B%E0%B8%A5%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%99%E0%B8%84%E0%B8%AD%E0%B8%A1%E0%B8%9E%E0%B8%B4%E0%B8%A7%E0%B9%80%E0%B8%95%E0%B8%AD%E0%B8%A3%E0%B9%8C%E0%B9%83%E0%B8%AB%E0%B9%89%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99%E0%B9%80%E0%B8%8B%E0%B8%B4%E0%B8%9F%E0%B9%80%E0%B8%A7%E0%B8%AD%E0%B8%A3%E0%B9%8C-%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87%E0%B8%84%E0%B9%88%E0%B8%B2-iis-%E0%B8%9A%E0%B8%99-windows-10-c-634c8ba5a15?source=rss----2d583aa65c97---4</link>
            <guid isPermaLink="false">https://medium.com/p/634c8ba5a15</guid>
            <dc:creator><![CDATA[PanachaiNY]]></dc:creator>
            <pubDate>Sun, 27 Aug 2017 04:12:21 GMT</pubDate>
            <atom:updated>2018-05-07T11:04:48.552Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kxtvvzVygoK_KHxyhrjtrg.jpeg" /></figure><p>เคยไหมเวลาจะยิง API จาก Mobile ไปยัง Web API ของเราแต่ไม่อยากเช่าเซิฟเวอร์ เรามีทางแก้ !!</p><p><strong>ปัญหา</strong></p><ul><li>ต้องการยิง API เพื่อดึงข้อมูลจาก Database ผ่าน Web API ในภาษา C#</li><li>ต้องการ Demo งานให้ออกมาเสมือนใช้งานจริงผ่านเซิฟเวอร์</li></ul><p>โดยปกติ Windows 10 จะมี IIS อยู่แล้วแต่เพียงไม่ได้เปิดใช้งานเท่านั้นเอง</p><ol><li>สามารถเข้าได้จาก Ctrl+R แล้วพิมพ์ appwiz.cpl แล้วคลิก OK</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*ArJoJOsh4fhff_6Vfv4-3A.png" /></figure><p>2. จะขึ้นหน้าต่าง Programs and Features คลิกที่ Turn Windows features on or off</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*pCdvFHsF8OyT28RUYFUmZA.png" /></figure><p>3. ให้ทำการตั้งค่าดังที่ได้วงกลมสีแดงไว้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*xipW3H3W2LBOPMYZ2VWGLA.png" /></figure><p>เพียงเท่านี้ก็เป็นอันเสร็จสิ้น เครื่อง Windows 10 ของเราก็จะเป็นสเมือนเซิฟเวอร์ตัวนึงแล้ว</p><blockquote><strong>หากเข้าที่ Windows feature แล้วไม่มีข้อมูลให้ทำตามลิ้งด้านล่าง</strong></blockquote><blockquote>(ผมทำตาม Method 2 แล้วผ่าน)</blockquote><blockquote><a href="https://www.wintips.org/how-to-fix-windows-features-list-blank-empty-windows-10-8/">https://www.wintips.org/how-to-fix-windows-features-list-blank-empty-windows-10-8/</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=634c8ba5a15" width="1" height="1" alt=""><hr><p><a href="https://medium.com/panachainy/%E0%B9%80%E0%B8%9B%E0%B8%A5%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%99%E0%B8%84%E0%B8%AD%E0%B8%A1%E0%B8%9E%E0%B8%B4%E0%B8%A7%E0%B9%80%E0%B8%95%E0%B8%AD%E0%B8%A3%E0%B9%8C%E0%B9%83%E0%B8%AB%E0%B9%89%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99%E0%B9%80%E0%B8%8B%E0%B8%B4%E0%B8%9F%E0%B9%80%E0%B8%A7%E0%B8%AD%E0%B8%A3%E0%B9%8C-%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87%E0%B8%84%E0%B9%88%E0%B8%B2-iis-%E0%B8%9A%E0%B8%99-windows-10-c-634c8ba5a15">[C#] เปลี่ยนคอมพิวเตอร์ให้เป็นเซิฟเวอร์ [วิธีตั้งค่า IIS บน Windows 10]</a> was originally published in <a href="https://medium.com/panachainy">PanachaiNY</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>