<?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[Stories by KwangTung Taesuji on Medium]]></title>
        <description><![CDATA[Stories by KwangTung Taesuji on Medium]]></description>
        <link>https://medium.com/@kwangtungtaesuji?source=rss-9a7ccd3d53f7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*uX85xHs0fGer-Sxo.</url>
            <title>Stories by KwangTung Taesuji on Medium</title>
            <link>https://medium.com/@kwangtungtaesuji?source=rss-9a7ccd3d53f7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 11:34:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kwangtungtaesuji/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[เมื่อคุณ “ตะโกนใส่ Facebook” แล้วได้คำตอบที่ดีกว่าถาม AI]]></title>
            <link>https://kwangtungtaesuji.medium.com/%E0%B9%80%E0%B8%A1%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%84%E0%B8%B8%E0%B8%93-%E0%B8%95%E0%B8%B0%E0%B9%82%E0%B8%81%E0%B8%99%E0%B9%83%E0%B8%AA%E0%B9%88-facebook-%E0%B9%81%E0%B8%A5%E0%B9%89%E0%B8%A7%E0%B9%84%E0%B8%94%E0%B9%89%E0%B8%84%E0%B8%B3%E0%B8%95%E0%B8%AD%E0%B8%9A%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%94%E0%B8%B5%E0%B8%81%E0%B8%A7%E0%B9%88%E0%B8%B2%E0%B8%96%E0%B8%B2%E0%B8%A1-ai-90a39e54a22c?source=rss-9a7ccd3d53f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/90a39e54a22c</guid>
            <category><![CDATA[gpt]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[openai]]></category>
            <dc:creator><![CDATA[KwangTung Taesuji]]></dc:creator>
            <pubDate>Wed, 22 Apr 2026 18:46:24 GMT</pubDate>
            <atom:updated>2026-04-22T18:46:24.179Z</atom:updated>
            <content:encoded><![CDATA[<p>เรื่องมันเริ่มจากง่าย ๆ เลยครับ 😄<br>เริ่มจาก ทีมงานมาเล่าให้ฟังว่า ลูกค้าอยากทำบริการสแกนใบหน้า พร้อมเลือกแว่นตาที่ถูกใจ แบบ Automation<br>โจทย์คือ “อยากมี Services ให้ AI สร้างภาพ แล้วเอาไปใช้งานต่อได้ทันที”</p><p>ฟังดูเหมือนไม่ยาก… นั่งคิดไป จิบเบียร์ไป 🍺 ดันคิดไม่ออกเฉยเลย 😅<br>ก็เลยลอง<strong> “ตะโกนใส่ Facebook”</strong> ครับ ว่า อยากได้ AI สร้างรูปเร็ว ๆ ขอแบบเอาไปใช้จริงได้เลยนะ!<br>จากนั้นก็ทำอะไรไปเรื่อยเปื่อย พอจิบเบียร์จนได้ที่ ดูไฮไลท์บอลคู่ Liverpool กับ Everton ที่ชนะแบบพลิกนรกตอน นาทีบาป</p><blockquote>แล้วลองไถ Facebook อ้าววววว เริ่มเจอโพสต์ของดี ของเด็ด 888</blockquote><p>ท่านเทพสาย AI และทั้งอาจารย์ทุกท่าน พร้อมใจกันแชร์เทคนิคเกี่ยวกับการใช้ AI Image เยอะแยะในวันนี้ <br>ก็เลยจับข้อความในโพสต์ โยนใส่ Claude ให้สรุปสั้น ๆ ใครทำอะไรที่ไหนยังไง<br>อ่านไป อ่านมา… อ๋อ เป็นแบบนี้นี่เอง ไอเดียก็ค่อยๆ เริ่มมาเฉยเลย</p><p>จากนั้นคิดว่าลองจับมาทำเป็น Services เล่นๆ ดู ดีไหม?</p><p>เริ่มจาก:<br>1. ใช้ Claude ช่วย generate cURL แบบสำเร็จรูป ตาม Services ที่จะใช้ คือ Gemini และ OpenAI จากนั้นก็โยนรูป นายแบบหน้าตาก๊งๆ เข้าไปให้กลายเป็น Base64 (ไม่ต้องบอกว่ารูปอะไร 🤣🤣🤣) เพื่อรอเก็บ response Image Base64 อีกที</p><p>2. ปรับ prompt text เล็กน้อย โดยอ้างอิงแนวทางจากไฟล์ skill.md ที่รวบรวมและนำมาปรับใช้ต่ออีกที (ไป copy ชาวบ้านเขามาอีกทีนึง)</p><p>3. จากข้อมูลที่มี เขาบอกให้ ลองของแรง ของแพงก่อน จะได้จบๆ กันไป จับใจความได้ว่ามัน คือ Gemini nano กล้วย ๆ ก็เลย<br>⚙️ สร้าง Services ตัวที่ 1: เริ่มจาก Gemini Flash 3.1<br>ผลลัพธ์คือ… “ดีแบบต้องหันกลับมามองซ้ำ ลุงที่ไหนครับเนี่ย”<br>- รองรับภาษาไทย ภาษาอังกฤษ ได้โอเค<br>- ภาพสวย คม ระดับที่ว่า… เอาไปใช้ต่อได้ทันที</p><p>แต่พอดูราคาปุ๊บ ไปกินเบียร์ดีกว่าไหม?<br>เพราะประมาณ 1,500–1,800 token ต่อภาพ<br>คุณภาพมาเต็ม… ราคาก็มาเต็ม ด้วยเหมือนกัน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6o4XYiiiEE4CtzdVphxN3w.png" /></figure><p>4. ลองขยับมาฝั่ง OpenAI หวังว่ามันจะ ราคาถูกกว่านะ?<br>⚙️ สร้าง Services ตัวที่ 2: เริ่มที่ DALL·E-3 (ชื่อเหมือนหนังเลย)<br>ต้องบอกว่า mood &amp; tone ดีมาก<br>ภาพดูมีสไตล์ น่าใช้งาน<br>.<br>แต่พอใส่ภาษาไทยเข้าไปเท่านั้นแหละ…<br>กลายเป็นข้อความบู้บี้ 🧠อ่านแล้ว งงกันไปเลย<br>อีกทั้งเจ้า DELL E เนี่ยจะโดนปิดการใช้งานอีกไม่กี่วัน 5555</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*-rhdETpTkmni3u55S4t6pQ.png" /></figure><p>.<br>⚙️ ลองปรับมา gpt-image-1<br>เริ่มดีขึ้น ภาพนิ่งขึ้น เข้าใจ prompt มากขึ้น<br>แต่พอรันหลาย ๆ รอบ เริ่มเห็นอาการ… “บางรูปดี บางรูปหลอน”<br>โดยเฉพาะภาษาไทย ยังมีความเซอร์ไพรส์อยู่เรื่อย ๆ 😅</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*2RA6xjetcXaXJ3Y8eOcETw.jpeg" /></figure><p>⚙️จุดที่เริ่มใช่: gpt-image-2 ก็เห็นสรุปจากอาจารย์ และกูรูส่วนใหญ่เล่นเจ้าตัวนี้กัน<br>พอมาถึงตัวนี้ ลองปรับ prompt อีกเล็กน้อย (ดูจากที่เขา Generate ภาพสวยๆ กันมา🤣🤣🤣)<br>เริ่มรู้สึกเลยว่า…“แก้มกลม” เอ๊ย “เอาไปต่อระบบได้จริงแล้ว”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*59J2Ig3LLHYuMgJ_TqEeZQ.png" /></figure><p><strong>สิ่งที่ชัดคือ</strong><br>✅ คุมโทนภาพได้ ภาษาไทยอ่านได้ถูกต้องมากๆๆ<br>✅ เข้าใจ layout ดีขึ้น แต่ก็ยังไม่ค่อยสมดุลเท่าไร<br>✅ ข้อความเริ่มวางได้แม่น<br>✅ output มีความสม่ำเสมอ<br>.<br>แม้จะมีแอบช้าบ้างตอน generate image แต่ก็พอนำไปทำเป็น Services ใช้งานได้จริงได้ละนะ<br>.<br>🍺 สรุปแบบคนจิบเบียร์ไป ทำไป บทความนี้ไม่ได้มาแชร์เทคนิคใหม่ ๆ แต่อยากจะบอกว่าบางทีการหาไอเดีย ไม่ต้องถาม AI ก็ได้<br>.<br><strong>แค่ follow facebook คนเก่ง ๆ เทพ ๆ ไว้ จากนั้น “ตะโกนใส่ App Facebook” แบบตั้งใจหวังผลหน่อยๆ 😄</strong><br>.<br>ไอเดียก็ไหลมาแบบไม่รู้ตัว<br>.<br>รอบนี้ใช้เวลาไปประมาณ 2 ชั่วโมง แบบเพลิน ๆ แต่ได้คำตอบที่เอาไปต่อยอดได้จริง ถือว่าคุ้มค่าเบียร์กว่าที่คิดเยอะเลยครับ 🚀</p><p>สุดท้าย AI ไม่กรุณาใส่ filter ให้พี่เลยย ก็หน้าสดไปสิครับบบ เริ่มงานจบงานตี 2 (รอดูบอลต่อยาวๆ)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90a39e54a22c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ทำรายได้จากการจองโรงแรมผ่านเว็บไซต์ด้วย Affiliate Marketing]]></title>
            <link>https://kwangtungtaesuji.medium.com/%E0%B8%97%E0%B8%B3%E0%B8%A3%E0%B8%B2%E0%B8%A2%E0%B9%84%E0%B8%94%E0%B9%89%E0%B8%88%E0%B8%B2%E0%B8%81%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%88%E0%B8%AD%E0%B8%87%E0%B9%82%E0%B8%A3%E0%B8%87%E0%B9%81%E0%B8%A3%E0%B8%A1%E0%B8%9C%E0%B9%88%E0%B8%B2%E0%B8%99%E0%B9%80%E0%B8%A7%E0%B9%87%E0%B8%9A%E0%B9%84%E0%B8%8B%E0%B8%95%E0%B9%8C%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-affiliate-marketing-a9c488389c85?source=rss-9a7ccd3d53f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9c488389c85</guid>
            <category><![CDATA[affiliate-marketing]]></category>
            <category><![CDATA[agoda]]></category>
            <category><![CDATA[cnxdevsoft]]></category>
            <category><![CDATA[bookingcom]]></category>
            <dc:creator><![CDATA[KwangTung Taesuji]]></dc:creator>
            <pubDate>Sun, 06 Jul 2025 11:03:54 GMT</pubDate>
            <atom:updated>2025-07-06T11:03:54.487Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>พร้อมรับคำปรึกษาและพัฒนาเว็บไซต์ Affiliate กับ </strong><a href="http://www.cnxdevsoft.com/"><strong>CNXDEVSOFT</strong></a></p><p>ในยุคที่คนค้นหาโรงแรมและที่พักผ่านออนไลน์แทบทุกวัน คุณรู้หรือไม่ว่า…<br> <strong>เจ้าของเว็บไซต์ / เพจ / บล็อก / แอป ก็สามารถสร้างรายได้จากการจองโรงแรม</strong> ได้ง่าย ๆ ด้วยระบบ <strong>Affiliate Program</strong> จากแพลตฟอร์มยักษ์ใหญ่อย่าง Booking.com และ Agoda</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kmTfgo6cS-A2xoko" /></figure><h3>🔗 Affiliate คืออะไร?</h3><p>Affiliate คือระบบที่ให้คุณโปรโมตลิงก์โรงแรมบนเว็บไซต์หรือแอปของคุณ หากมีคนกดจองผ่านลิงก์นั้น คุณจะได้ <strong>ค่าคอมมิชชัน</strong> ตามยอดจองโดยไม่ต้องดูแลโรงแรมเองเลยแม้แต่นิดเดียว!<br>ระบบนี้เหมาะกับ:</p><p>✅ เจ้าของเว็บไซต์ท่องเที่ยว<br>✅ Blogger/Vlogger ที่มีเนื้อหารีวิว<br>✅ เอเจนซี่ที่รับจองโรงแรม<br>✅ คนที่อยากมี Passive Income จากเว็บ</p><h3>สายจองโรงแรมก็มี Affiliate ให้คุณใช้</h3><h4>✅ Booking.com Affiliate Partner</h4><ul><li>สมัครง่าย ใช้เวลาไม่กี่วัน</li><li>มีเครื่องมือครบ ทั้งแบนเนอร์, Search Box, Deep Link</li><li>ค่าคอมมิชชันคิดเป็นเปอร์เซ็นต์จากยอดจอง</li></ul><p>👉 สมัครได้ที่: <a href="https://www.booking.com/affiliate-program">https://www.booking.com/affiliate-program</a></p><h4>✅ Agoda Affiliate Program</h4><ul><li>มีระบบ API สำหรับนักพัฒนา</li><li>ใช้ได้ทั้งเว็บไซต์และแอป</li><li>เน้นผู้ใช้งานในเอเชีย</li></ul><p>👉 สมัครได้ที่: <a href="https://partners.agoda.co/">https://partners.agoda.co</a>m</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cQcrebttqakoCj0O.jpg" /></figure><h4>🖥️ ตัวอย่างการทำ Affiliate กับ Agoda และ Booking</h4><p><strong>ตัวอย่างที่ 1: บล็อกรีวิวเที่ยวเชียงใหม่ </strong>เว็บไซต์ “เที่ยวเหนือเถอะ” เขียนรีวิวโรงแรมในย่านนิมมาน แล้วแทรกลิงก์จอง Agoda และ Booking ในบทความ เช่น:</p><blockquote><em>🛏️ </em>“ถ้าอยากพักหรูใจกลางนิมมาน เราแนะนำ Stay with Nimman Hotel ที่นี่มีอ่างอาบน้ำบนดาดฟ้าด้วย!”</blockquote><p>ผู้อ่านกดลิงก์ → ไปยังหน้า Booking → จองโรงแรม → เจ้าของบล็อกรับค่าคอมมิชชัน 💰</p><p><strong>ตัวอย่างที่ 2: เว็บไซต์รวมดีลโรงแรมหัวหิน </strong>เว็บ “พักไหนดี.com” สร้างหน้าเพจชื่อ “10 โรงแรมหัวหินติดทะเล ราคาดีที่สุด” โดยใช้ Deep Link Affiliate จาก Agoda ไปยังหน้าโรงแรมต่าง ๆ พร้อมปุ่ม “จองเลย”</p><blockquote><em>✨ เพิ่มความน่าเชื่อถือโดยแสดง “รีวิวจากผู้ใช้จริง” และ “คะแนนจาก Agoda/Booking”</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/0*tsC3wx-eoArcBvAS.png" /></figure><h4>หากคุณทำธุรกิจบริการรับทำวีซ่า และมีเว็บไซต์ท่องเที่ยว หรือบล็อกแนะนำที่พัก</h4><p>คุณสามารถทำ <strong>Affiliate Booking.com หรือ Agoda ควบคู่ไปกับบริการของคุณได้</strong> เช่น</p><ul><li>เขียนบทความรีวิวที่พักในประเทศที่ลูกค้าต้องการทำวีซ่า</li><li>ใส่ลิงก์ Affiliate Booking หรือ Agoda เพื่อหารายได้เสริมจากการจองที่พัก</li><li>พร้อมให้คำปรึกษาหรือรับทำวีซ่าแยกกัน</li></ul><p><strong>แนะนำแนวทาง</strong></p><ul><li>ทำ Affiliate Agoda/Booking โดยตรงกับบริการทำวีซ่าได้ไหม? <strong>ไม่ได้</strong></li><li>ทำ Affiliate Agoda/Booking ควบคู่กับบริการรับทำวีซ่าได้ไหม? <strong>ได้</strong></li><li>ควรทำอย่างไร? <strong>แยกบทบาทชัดเจน ให้ข้อมูลวีซ่า และแทรกลิงก์จองที่พักเพื่อสร้างรายได้เสริม</strong></li></ul><h4>💡 แล้วถ้าคุณอยากเริ่มทำ Affiliate กับสองเจ้านี้ ต้องเตรียมอะไรบ้าง?</h4><h4>🛠 สิ่งที่ควรมี:</h4><ul><li>เว็บไซต์หรือเพจที่มีเนื้อหาเกี่ยวกับการท่องเที่ยว</li><li>บทความหรือรีวิวโรงแรม / ที่เที่ยว</li><li>ระบบติดลิงก์ Affiliate (HTML, Website plugin หรือ API)</li><li>เครื่องมือวัดผล เช่น Google Analytics / Facebook Pixel</li></ul><h4>👨‍💻 หากคุณไม่มีทีมไอที หรือไม่มีเว็บมาก่อน</h4><p><strong>CNXDEVSOFT</strong> ยินดีให้บริการ:</p><ul><li>ออกแบบและพัฒนาเว็บไซต์ Affiliate ท่องเที่ยว</li><li>เชื่อมระบบกับ Booking.com และ Agoda</li><li>วางระบบคำนวณรายได้และติดตามผล</li><li>ทำระบบแสดงโรงแรมอัตโนมัติผ่าน API</li><li>ทำระบบ “เปรียบเทียบโรงแรม” หรือจัดหมวดหมู่แบบมืออาชีพ</li></ul><p><strong>สรุป</strong><br>หากคุณมีเว็บไซต์หรือบล็อกท่องเที่ยว การสร้างรายได้ด้วยระบบ Affiliate จาก Booking.com และ Agoda เป็นทางเลือกที่น่าสนใจ โดยไม่ต้องลงทุนเปิดโรงแรมเอง เพียงแค่สมัครเป็นพาร์ทเนอร์ สร้างลิงก์แนะนำโรงแรมหรือกิจกรรม แล้วนำไปติดไว้ในบทความ รีวิว หรือเนื้อหาท่องเที่ยวของคุณ</p><p>หากมีคนคลิกและจองผ่านลิงก์นั้น คุณจะได้รับค่าคอมมิชชั่นทันที ซึ่งสามารถพัฒนาเว็บไซต์ให้รองรับการค้นหาผ่านมือถือและ SEO เพื่อให้มีผู้เข้าชมมากขึ้น ยิ่งคนเข้าชมมาก รายได้ยิ่งเพิ่ม นอกจากนี้ยังสามารถโปรโมทผ่านโซเชียลมีเดียต่างๆ หรือทำเนื้อหาเฉพาะกลุ่ม เช่น สายแบ็คแพ็คหรือครอบครัว เพื่อเพิ่มโอกาสในการจองและสร้างรายได้ระยะยาวจากโลกออนไลน์</p><h4>📩 สนใจเริ่มต้นระบบ Affiliate กับ Booking หรือ Agoda?</h4><p>ติดต่อเราได้ทันที:<br> 📧 Email: info@cnxdevsoft.com<br> 🌐 Website: <a href="https://www.cnxdevsoft.com/">www.cnxdevsoft.com</a><br> 📱 Line: @cnxdevsoft</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9c488389c85" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[เพิ่มประสิทธิภาพทางธุรกิจ 4.0 ด้วยการใช้ Azure Logic Apps]]></title>
            <link>https://kwangtungtaesuji.medium.com/%E0%B9%80%E0%B8%9E%E0%B8%B4%E0%B9%88%E0%B8%A1%E0%B8%9B%E0%B8%A3%E0%B8%B0%E0%B8%AA%E0%B8%B4%E0%B8%97%E0%B8%98%E0%B8%B4%E0%B8%A0%E0%B8%B2%E0%B8%9E%E0%B8%97%E0%B8%B2%E0%B8%87%E0%B8%98%E0%B8%B8%E0%B8%A3%E0%B8%81%E0%B8%B4%E0%B8%88-4-0-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89-azure-logic-apps-26d0c392930a?source=rss-9a7ccd3d53f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/26d0c392930a</guid>
            <category><![CDATA[azure-logic-apps]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[cnxdevsoft]]></category>
            <dc:creator><![CDATA[KwangTung Taesuji]]></dc:creator>
            <pubDate>Thu, 10 Oct 2024 04:39:27 GMT</pubDate>
            <atom:updated>2024-10-10T04:39:27.177Z</atom:updated>
            <content:encoded><![CDATA[<p>ลดต้นทุน เพิ่มกำไร: <strong>การใช้ระบบอัตโนมัติ (Automation)</strong> เพื่อเพิ่มประสิทธิภาพในกระบวนการธุรกิจ <br>จากคำกล่าวนี้สามารถนำเทคโนโลยี <a href="https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-overview"><strong>Azure Logic Apps</strong></a> เข้ามามีบทบาทอย่างมากในกระบวนการทำงานของธุรกิจในปัจจุบัน ไม่ว่าจะเป็นการจัดการเอกสาร การผลิตสินค้า หรือแม้แต่การบริการลูกค้า เทคโนโลยีนี้ไม่เพียงช่วยลดความผิดพลาดจากการทำงานด้วยมือ แต่ยังสามารถลดเวลาในการทำงาน และเปิดโอกาสให้ทีมงานมุ่งเน้นการทำงานที่สร้างคุณค่าได้มากยิ่งขึ้น</p><p><strong>Azure Logic Apps</strong> เป็นบริการของ Microsoft Azure ที่ช่วยให้นักพัฒนาและผู้ใช้ทางธุรกิจสามารถสร้างและจัดการเวิร์กโฟลว์อัตโนมัติ (automated workflows) ระหว่างแอปพลิเคชันและบริการต่าง ๆ โดยไม่จำเป็นต้องเขียนโค้ดมากนัก หรือในบางกรณีไม่ต้องเขียนเลยครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*WpbrfgIU7L_92OZX" /></figure><p>Azure Logic Apps สามารถช่วยในการเชื่อมต่อบริการและแอปพลิเคชันทั้งบนคลาวด์และในองค์กร เช่น Microsoft 365, Dynamics, Salesforce, SharePoint, และอื่น ๆ โดยรองรับการเชื่อมต่อผ่าน API ต่าง ๆ ที่เรียกว่า <strong>Connectors</strong></p><p><strong>ทำไมต้องใช้ Azure Logic Apps?</strong><br>1. ใช้งานง่าย: ด้วยอินเทอร์เฟซแบบกราฟิก สามารถสร้าง workflow ที่ซับซ้อนได้โดยไม่ต้องเขียนโค้ด<br>2. เชื่อมต่อได้หลากหลาย: Azure Logic Apps มีคอนเนกเตอร์ที่พร้อมใช้งานมากกว่า 400 ตัว เพื่อเชื่อมโยงกับบริการต่าง ๆ เช่น Office 365, SQL, Salesforce, และอื่น ๆ<br>3. ไม่มีข้อจำกัดในการใช้งาน: Logic Apps รองรับการเชื่อมต่อทั้งบนคลาวด์และ on-premises รวมถึงรองรับการทำงานแบบไฮบริด</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dSCM0WQ8sSOwCFt7" /></figure><p><strong>ขั้นตอนการสร้าง Workflow ด้วย Azure Logic Apps</strong><br>1. การตั้งค่า Logic App<br>- เข้าสู่ Azure Portal และสร้าง Logic App ใหม่ โดยการระบุชื่อและเลือก subscription และ resource group ที่ต้องการ</p><p>2. เลือก Trigger<br>- ทุก Logic App ต้องเริ่มต้นด้วย trigger เช่น เมื่อมีอีเมลใหม่เข้ามา หรือการเพิ่มไฟล์ใหม่ใน OneDrive เป็นต้น สามารถเลือกจาก trigger ที่มีอยู่แล้ว เช่น HTTP request, เวลา (Scheduled), หรือ Webhook เป็นต้น</p><p>3. เพิ่ม Actions<br>- หลังจากกำหนด trigger แล้วสามารถเพิ่ม actions เพื่อดำเนินการต่อเนื่อง เช่น การส่งอีเมล การอัปเดตฐานข้อมูล หรือการส่งข้อความแจ้งเตือนผ่าน Microsoft Teams<br>ตัวอย่างเช่น ถ้ากำลังสร้าง workflow เพื่อส่งอีเมลแจ้งเตือนเมื่อมีการอัปโหลดไฟล์ใน SharePoint สามารถใช้ SharePoint connector เพื่อตรวจจับไฟล์ใหม่และ Outlook connector เพื่อส่งอีเมล</p><p>4. การปรับแต่งและเงื่อนไข (Conditions)<br>- Logic Apps ยังรองรับการตั้งเงื่อนไข (Conditions) เพื่อให้ workflow ทำงานตามสถานการณ์ที่กำหนด เช่น หากไฟล์ที่อัปโหลดมีขนาดเกิน 10MB ให้ย้ายไฟล์นั้นไปยังโฟลเดอร์พิเศษ</p><p>5. ทดสอบและ Deploy<br>- เมื่อสร้าง workflow เสร็จแล้ว สามารถทดสอบการทำงานและ deploy เพื่อเริ่มใช้งานจริง โดย Logic Apps มีเครื่องมือให้ทดสอบ workflow และดูผลลัพธ์แบบเรียลไทม์</p><h4><strong>ตัวอย่างการใช้งาน Azure Logic Apps</strong></h4><p>ตัวอย่าง 1: การรับอีเมลและบันทึกลงใน SharePoint<br>-Trigger: เมื่อได้รับอีเมลใหม่ใน Microsoft Outlook<br>-Actions:<br>1.1 ดาวน์โหลดไฟล์แนบจากอีเมล<br>1.2 บันทึกไฟล์ลงใน SharePoint<br>1.3 แจ้งเตือนผู้ใช้งานผ่าน Microsoft Teams</p><p>ตัวอย่าง 2: การแจ้งเตือนเมื่อมีการเพิ่มข้อมูลในฐานข้อมูล SQL<br>- Trigger: เมื่อมีการเพิ่มแถวข้อมูลใหม่ในฐานข้อมูล SQL Server<br>- Actions:<br>2.1 ส่งการแจ้งเตือนทางอีเมลไปยังผู้จัดการ<br>2.2 อัปเดตข้อมูลในระบบ CRM</p><h4>ประโยชน์ของการใช้งาน Azure Logic Apps</h4><ol><li><strong>เชื่อมต่อหลายบริการได้ง่าย</strong>: Azure Logic Apps มี <strong>Connectors</strong> มากกว่า 200+ ที่สามารถเชื่อมต่อกับบริการบนคลาวด์ แอปพลิเคชัน หรือบริการในองค์กรได้โดยง่าย เช่น Office 365, Google Services, Azure Services, Dynamics 365, Salesforce เป็นต้น</li><li><strong>อัตโนมัติและปรับปรุงกระบวนการทางธุรกิจ</strong>: Logic Apps ช่วยให้ธุรกิจสามารถลดขั้นตอนที่ต้องทำด้วยมือได้ ทำให้การทำงานรวดเร็วและแม่นยำมากขึ้น</li><li><strong>ใช้งานง่าย</strong>: ไม่จำเป็นต้องมีความรู้ในการเขียนโค้ดมากนัก สามารถใช้ Logic Apps Designer ในการออกแบบเวิร์กโฟลว์ได้อย่างง่ายดาย</li><li><strong>รองรับการทำงานร่วมกับ DevOps</strong>: สามารถใช้งานร่วมกับ CI/CD pipelines และการทำงานแบบ DevOps ได้อย่างง่ายดาย ทำให้การพัฒนาและการปรับปรุง Logic App เป็นไปอย่างราบรื่น</li><li><strong>จ่ายตามการใช้งาน</strong>: ผู้ใช้จ่ายเงินตามจำนวนครั้งที่ Logic App ถูกเรียกใช้ ทำให้ลดค่าใช้จ่ายที่ไม่จำเป็น</li></ol><h4>ข้อจำกัดในการใช้งาน Azure Logic Apps</h4><ol><li><strong>ข้อจำกัดของ Connectors</strong>: บางครั้งอาจต้องใช้ Connectors เฉพาะที่ไม่สามารถใช้ได้โดยตรงจาก Logic Apps ซึ่งจำเป็นต้องสร้างตัวเชื่อมต่อแบบกำหนดเอง (Custom Connectors)</li><li><strong>ข้อจำกัดด้านความซับซ้อนของเวิร์กโฟลว์</strong>: สำหรับกระบวนการที่มีเงื่อนไขซับซ้อนมาก หรือมีการทำงานที่ต้องการการเขียนโค้ดระดับสูง อาจไม่เหมาะกับ Logic Apps และอาจต้องหันไปใช้ Azure Functions หรือบริการอื่น ๆ</li><li><strong>Latency (ความล่าช้า)</strong>: บางครั้งอาจเกิดความล่าช้าเล็กน้อยในขั้นตอนการเชื่อมต่อหรือประมวลผลข้อมูลเมื่อมีการเชื่อมต่อหลายระบบ</li><li><strong>ค่าใช้จ่ายตามการใช้งาน</strong>: แม้ว่าจะเป็นข้อดีที่การคิดค่าใช้จ่ายเป็นแบบ pay-per-use แต่หากเวิร์กโฟลว์ถูกเรียกใช้งานบ่อยครั้ง ค่าใช้จ่ายอาจเพิ่มขึ้นอย่างรวดเร็วโดยไม่คาดคิด</li></ol><p><strong>การนำไปใช้แก้ปัญหาหรือสร้าง solution ในงานธุรกิจ</strong></p><p>1. การจัดการคำสั่งซื้ออัตโนมัติ<br><strong>สถานการณ์</strong>: ธุรกิจ e-commerce ที่มีการรับคำสั่งซื้อจากหลายช่องทาง เช่น เว็บไซต์, แอปพลิเคชัน, และแพลตฟอร์มอื่น ๆ ต้องการจัดการคำสั่งซื้อแบบเรียลไทม์<br><strong>การใช้ Logic Apps:</strong><br>ใช้ trigger เมื่อมีคำสั่งซื้อใหม่ในฐานข้อมูลหรือระบบจัดการสต็อก (เช่น SQL หรือ SharePoint)<br>ส่งอีเมลแจ้งเตือนอัตโนมัติให้กับทีมที่เกี่ยวข้องผ่าน Office 365 หรือ Outlook<br>สร้างการแจ้งเตือนใน Microsoft Teams เพื่อแจ้งให้ทีมโลจิสติกส์ทราบ<br>อัปเดตสถานะการจัดส่งอัตโนมัติในระบบ ERP</p><p>2. การจัดการข้อมูลลูกค้า (Customer Data Integration)<br><strong>สถานการณ์</strong>: บริษัทที่ต้องการรวบรวมข้อมูลลูกค้าจากระบบ CRM, ระบบการตลาด และระบบอื่น ๆ เพื่อสร้างมุมมองลูกค้าแบบรวมศูนย์<br><strong>การใช้ Logic Apps:</strong><br>ใช้ Salesforce connector เพื่อดึงข้อมูลจากระบบ CRM และ Dynamics 365 connector เพื่อดึงข้อมูลจากระบบ ERP<br>รวมข้อมูลจากแหล่งต่าง ๆ เข้าด้วยกันและอัปเดตฐานข้อมูลลูกค้าใน SQL Server หรือ Excel ผ่าน OneDrive<br>สร้างการแจ้งเตือนเมื่อมีลูกค้าใหม่เข้ามา เพื่อให้ทีมการตลาดสามารถดำเนินการต่อได้ทันที</p><p>3. การจัดการงานเอกสารและอนุมัติอัตโนมัติ<br><strong>สถานการณ์:</strong> องค์กรที่มีการจัดการเอกสารและการอนุมัติโครงการหรือคำขอที่เกี่ยวข้องกับหลายหน่วยงาน<br><strong>การใช้ Logic Apps:</strong><br>เมื่อมีเอกสารอัปโหลดใหม่ใน SharePoint, Logic Apps จะส่งอีเมลแจ้งเตือนไปยังผู้รับผิดชอบที่ต้องทำการตรวจสอบ<br>ตั้งเงื่อนไข (condition) เพื่อให้ workflow ตรวจสอบว่าผู้ตรวจสอบอนุมัติหรือปฏิเสธ หากอนุมัติ ให้ส่งอีเมลแจ้งไปยังหน่วยงานถัดไป<br>หากอนุมัติครบถ้วน Logic Apps จะอัปเดตสถานะเอกสารในระบบ ERP และส่งข้อมูลไปยังผู้ที่เกี่ยวข้องทั้งหมด</p><p>4. การรวมระบบการตลาดอัตโนมัติ (Marketing Automation)<br><strong>สถานการณ์:</strong> ธุรกิจที่ต้องการเชื่อมโยงแพลตฟอร์มการตลาดเพื่อส่งอีเมลและข้อความส่งเสริมการขายให้กับกลุ่มลูกค้าเป้าหมาย<br><strong>การใช้ Logic Apps:</strong><br>ใช้ trigger เมื่อมีการลงทะเบียนใหม่หรือข้อมูลลูกค้าถูกอัปเดตจาก CRM (เช่น HubSpot หรือ Salesforce)<br>ส่งข้อมูลไปยัง MailChimp หรือ SendGrid เพื่อส่งอีเมลการตลาด<br>ตรวจสอบสถานะการเปิดอีเมลและติดตามผลผ่าน Logic Apps เพื่ออัปเดตคะแนนการมีส่วนร่วมของลูกค้าในระบบ CRM</p><p>5. การจัดการคำร้องของลูกค้า (Customer Support Automation)<br><strong>สถานการณ์:</strong> ศูนย์บริการลูกค้าที่ต้องการปรับปรุงกระบวนการจัดการคำร้องและปัญหาของลูกค้า<br><strong>การใช้ Logic Apps:</strong><br>เมื่อมีคำร้องเข้ามาใหม่ผ่าน Zendesk หรือ Freshdesk, Logic Apps จะสร้างการแจ้งเตือนไปยังทีมสนับสนุนผ่าน Microsoft Teams หรือส่งอีเมลแจ้งเตือนอัตโนมัติ<br>อัปเดตสถานะของคำร้องในฐานข้อมูล และสร้างการแจ้งเตือนเมื่อมีการแก้ไขปัญหาเสร็จสิ้น<br>สร้าง workflow สำหรับการตอบกลับลูกค้าอัตโนมัติเมื่อคำร้องได้รับการจัดการเรียบร้อย</p><h3>สรุป</h3><p>ในยุคที่การแข่งขันทางธุรกิจเพิ่มสูงขึ้น การปรับปรุงประสิทธิภาพในการดำเนินงานกลายเป็นกุญแจสำคัญที่ไม่อาจมองข้ามได้ ทุกองค์กรต่างมุ่งหวังที่จะลดต้นทุน เพิ่มกำไร และนำทรัพยากรที่มีอยู่มาใช้ให้เกิดประโยชน์ <br><a href="https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-overview">Azure Logic Apps</a> เป็นเครื่องมือที่ช่วยสร้างการทำงานแบบอัตโนมัติที่ยืดหยุ่น เหมาะสำหรับธุรกิจที่ต้องการเชื่อมต่อหลายระบบเข้าด้วยกัน<strong> <br></strong>และสามารถสร้างเวิร์กโฟลว์ได้โดยไม่ต้องเขียนโค้ดมากนัก แม้ว่าจะมีข้อจำกัดบางอย่างในการใช้งาน แต่ก็มีประโยชน์อย่างมากในการเพิ่มประสิทธิภาพการทำงานและลดความซับซ้อนในกระบวนการ</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26d0c392930a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jürgen Klopp inspiration for working in a software company]]></title>
            <link>https://kwangtungtaesuji.medium.com/j%C3%BCrgen-klopp-inspiration-for-working-in-a-software-company-35fd7e178f52?source=rss-9a7ccd3d53f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/35fd7e178f52</guid>
            <category><![CDATA[jurgen-klopp]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[cnxdevsoft]]></category>
            <category><![CDATA[liverpool]]></category>
            <dc:creator><![CDATA[KwangTung Taesuji]]></dc:creator>
            <pubDate>Tue, 08 Oct 2024 03:10:38 GMT</pubDate>
            <atom:updated>2024-10-08T03:14:28.807Z</atom:updated>
            <content:encoded><![CDATA[<p>My name is PATOMPOL TAESUJI, managing director of CNXDEVSOFT Company in Thailand. and I am also Liverpool football club fans. I appreciate Jürgen Klopp, he was football manager of Liverpool football club between 2015 to 2023, is widely recognized for his unique management style and approach to football.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/0*Bkdxlo0qb0x4oKyU" /></figure><p>Jürgen Klopp’s leadership style and philosophy can be a great source of inspiration for working in a software company. His approach to managing football teams shares several key principles that can be applied to team dynamics, project management, and innovation in the tech industry. Here’s how you can use his methods to inspire success in a software company:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yff_PjESnUNNzkVz" /></figure><h3>1. Foster a Strong Team Culture</h3><ul><li><strong>Klopp’s Approach</strong>: Klopp is known for creating a positive, united team culture where everyone feels valued and works towards a common goal.</li><li><strong>Application in Software</strong>: Encourage a strong, collaborative environment in your team. Make sure each team member feels like they are part of something bigger. This can be done through regular communication, team-building activities, and ensuring everyone understands the company’s vision.</li></ul><h3>2. Embrace Passion and Enthusiasm</h3><ul><li><strong>Klopp’s Approach</strong>: Klopp’s passion for football is infectious. His energy on the sidelines and his genuine love for the game inspires his players and fans alike.</li><li><strong>Application in Software</strong>: Bring passion and enthusiasm to your projects. Whether you’re leading a team or contributing as a developer, show excitement for the work you’re doing. This kind of energy can motivate others and create a more engaging workplace.</li></ul><h3>3. Lead by Example</h3><ul><li><strong>Klopp’s Approach</strong>: Klopp leads by example, showing dedication, work ethic, and a positive attitude. He’s not afraid to take responsibility when things go wrong.</li><li><strong>Application in Software</strong>: As a leader in a software company, demonstrate the values you expect from your team. Whether it’s being accountable, staying late to meet a deadline, or learning new technologies, show your team what hard work and dedication look like.</li></ul><h3>4. Encourage Continuous Learning</h3><ul><li><strong>Klopp’s Approach</strong>: Klopp focuses on developing and improving his players, helping them grow throughout their careers.</li><li><strong>Application in Software</strong>: Encourage your team to continuously learn and improve their skills. Support opportunities for professional development, whether through conferences, certifications, or online courses. Create a culture where knowledge sharing is embraced and encouraged.</li></ul><h3>5. Adaptability and Flexibility</h3><ul><li><strong>Klopp’s Approach</strong>: Klopp is known for his tactical flexibility, adapting his strategies based on the strengths and weaknesses of his team or opponents.</li><li><strong>Application in Software</strong>: Encourage your team to be adaptable. In software development, requirements and technologies change rapidly. Ensure that your team is open to change, whether it’s pivoting to a new project strategy or adopting the latest technology stack.</li></ul><h3>6. Develop a Clear Vision and Strategy</h3><ul><li><strong>Klopp’s Approach</strong>: Klopp has a clear vision for his teams. At Liverpool, he knew what kind of football he wanted to play and what kind of players he needed to succeed.</li><li><strong>Application in Software</strong>: Develop a clear vision for your project or product. Ensure that everyone on your team understands the end goal and their role in achieving it. Like Klopp, communicate your vision clearly and regularly so the team stays focused and motivated.</li></ul><h3>7. Promote Trust and Empowerment</h3><ul><li><strong>Klopp’s Approach</strong>: Klopp empowers his players by trusting them to execute their roles on the field. He gives them the freedom to express themselves but holds them accountable.</li><li><strong>Application in Software</strong>: Trust your team members to take ownership of their tasks. Allow them the freedom to innovate and make decisions, but also ensure accountability for the work they deliver. This creates a sense of responsibility and pride in their contributions.</li></ul><h3>8. Emphasize Resilience and Perseverance</h3><ul><li><strong>Klopp’s Approach</strong>: Klopp’s teams are known for their resilience, often coming from behind to win matches. He instills a never-give-up attitude.</li><li><strong>Application in Software</strong>: In the face of challenges or failures, remind your team of the importance of resilience. Projects might face setbacks, but perseverance can lead to eventual success. A resilient team is one that doesn’t lose motivation easily and can handle pressure effectively.</li></ul><h3>9. Celebrate Success but Learn from Failure</h3><ul><li><strong>Klopp’s Approach</strong>: Klopp celebrates victories with his team but also ensures they learn from their mistakes and failures.</li><li><strong>Application in Software</strong>: Celebrate your team’s achievements, whether it’s launching a new product or completing a difficult sprint. At the same time, when something goes wrong, foster an environment where mistakes are seen as learning opportunities, not failures. This helps build a culture of continuous improvement.</li></ul><h3>10. Inspire with Authenticity and Transparency</h3><ul><li><strong>Klopp’s Approach</strong>: Klopp is authentic and transparent with his players and the public. He’s honest, open, and approachable, which makes his leadership style relatable.</li><li><strong>Application in Software</strong>: Be authentic and transparent with your team. Whether you’re discussing project updates, challenges, or the overall direction of the company, honesty helps build trust and respect. Authentic leaders inspire loyalty and create a more open and trusting work environment.</li></ul><h3>Summary</h3><p>Using Jürgen Klopp as an inspiration for working in a software company means adopting his principles of team unity, adaptability, passion, and strong leadership. Whether you’re managing a project or a team, these values can help drive innovation, foster a positive work culture, and ensure long-term success in your software projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35fd7e178f52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[การเขียน Prompt ที่ดีเพื่อให้ AI เข้าใจเกี่ยวกับการเขียนโปรแกรมด้วย C# .NET Core 8]]></title>
            <link>https://medium.com/cnxdevsoft/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99-prompt-%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%94%E0%B8%B5%E0%B9%80%E0%B8%9E%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B9%83%E0%B8%AB%E0%B9%89-ai-%E0%B9%80%E0%B8%82%E0%B9%89%E0%B8%B2%E0%B9%83%E0%B8%88%E0%B9%80%E0%B8%81%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%A7%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99%E0%B9%82%E0%B8%9B%E0%B8%A3%E0%B9%81%E0%B8%81%E0%B8%A3%E0%B8%A1%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-c-net-core-8-3f43699c2b10?source=rss-9a7ccd3d53f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f43699c2b10</guid>
            <category><![CDATA[net-core]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[cnxdevsoft]]></category>
            <category><![CDATA[prompt]]></category>
            <dc:creator><![CDATA[KwangTung Taesuji]]></dc:creator>
            <pubDate>Sat, 17 Aug 2024 10:43:53 GMT</pubDate>
            <atom:updated>2024-08-17T10:45:23.878Z</atom:updated>
            <content:encoded><![CDATA[<h3>การเขียน Prompt ที่ดีเพื่อให้ AI เข้าใจเกี่ยวกับการเขียนโปรแกรมด้วย C# .NET Core 8</h3><p>ในโลกของการพัฒนาโปรแกรมที่เต็มไปด้วยความยุ่งเหยิงและความซับซ้อน เราต้องการเครื่องมือที่ช่วยให้การทำงานของเราง่ายขึ้น แต่การสื่อสารกับ AI ให้ได้ผลลัพธ์ที่ตรงใจนั้นต้องการมากกว่าการเขียนโค้ดสวยๆ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*LvS900UYbpjwJFElA6ho2A.png" /></figure><p>การเขียน prompt ที่ดีเปรียบเสมือนการสร้างสูตรลับของเชฟที่ดีที่สุดในโลก คุณต้องรู้จักใส่ส่วนผสมที่ลงตัวและรู้ว่าเมื่อไหร่ควรหยุดเติมเกลือเพื่อไม่ให้มันเค็มเกินไป</p><p>ในบทความนี้ เราจะดูวิธีการเขียน prompt ที่จะช่วยให้คุณพัฒนาโปรแกรมด้วย .NET Core 8 ได้อย่างมีประสิทธิภาพและสนุกสนาน พร้อมด้วยตัวอย่างโค้ด C# ที่พวกเราทีม <a href="https://cnxdevsoft.com/">CNXDEVSOFT </a>ใช้กันครับ!</p><h4>1. ระบุปัญหาหรือคำถามให้ชัดเจน</h4><p><strong>ตัวอย่าง:</strong><br>“รบกวนช่วยดูโค้ดนี้ให้หน่อยครับ ทำไม SaveChanges() ถึงไม่ทำงานในโปรเจกต์ C# .NET Core 8 ของฉัน?&quot;</p><p><strong>โค้ดตัวอย่าง:</strong></p><pre>public class MyService<br>{<br>    private readonly MyDbContext _context;<br>    <br>    public MyService(MyDbContext context)<br>    {<br>        _context = context;<br>    }<br>    <br>    public void AddRecord(MyEntity entity)<br>    {<br>        _context.MyEntities.Add(entity);<br>        _context.SaveChanges(); // ปัญหาเกิดขึ้นที่นี่<br>    }<br>}</pre><h4>2. ให้ข้อมูลพื้นฐานเกี่ยวกับการตั้งค่า</h4><p><strong>ตัวอย่าง:</strong><br>“ฉันใช้ Entity Framework Core 8 กับ SQL Server รบกวนตรวจสอบการตั้งค่า DbContext ของฉันหน่อยครับ”</p><p><strong>โค้ดตัวอย่าง:</strong></p><pre>public class MyDbContext : DbContext<br>{<br>    public DbSet&lt;MyEntity&gt; MyEntities { get; set; }<br>    <br>    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)<br>    {<br>        optionsBuilder.UseSqlServer(&quot;Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;&quot;);<br>    }<br>}</pre><h4>3. ระบุกรณีการใช้งานจริง</h4><p><strong>ตัวอย่าง:</strong><br>&quot;โปรเจกต์ของฉันต้องการใช้ <a href="https://learn.microsoft.com/en-us/azure/architecture/patterns/cqrs">CQRS</a>: MediatR สำหรับการจัดการคำสั่งและคำร้อง รบกวนช่วยแนะนำการตั้งค่าและการใช้งานให้หน่อยครับ&quot;</p><p><strong>โค้ดตัวอย่าง:</strong></p><pre>public class MyEntityCreatedEvent : INotification<br>{<br>    public MyEntity Entity { get; set; }<br>}<br><br>public class MyEntityCreatedEventHandler : INotificationHandler&lt;MyEntityCreatedEvent&gt;<br>{<br>    public Task Handle(MyEntityCreatedEvent notification, CancellationToken cancellationToken)<br>    {<br>        // Handle the event<br>        return Task.CompletedTask;<br>    }<br>}</pre><h4>4. ระบุผลลัพธ์ที่ต้องการ</h4><p><strong>ตัวอย่าง:</strong><br>“ฉันต้องการให้ UpdateRecord() อัปเดตข้อมูลในฐานข้อมูลและส่งผลลัพธ์กลับมาว่าการอัปเดตสำเร็จหรือไม่ รบกวนช่วยดูโค้ดนี้หน่อยครับ&quot;</p><p><strong>โค้ดตัวอย่าง:</strong></p><pre>public async Task&lt;bool&gt; UpdateRecordAsync(int id, string newValue)<br>{<br>    var entity = await _context.MyEntities.FindAsync(id);<br>    if (entity != null)<br>    {<br>        entity.Value = newValue;<br>        await _context.SaveChangesAsync();<br>        return true;<br>    }<br>    return false;<br>}</pre><h4>5. ใช้ภาษาและคำสั่งที่ตรงไปตรงมา</h4><p><strong>ตัวอย่าง:</strong><br>“ช่วยอธิบายการใช้ IRequestHandler ใน MediatR และวิธีการจัดการกับคำสั่ง (commands) และคำร้อง (queries) หน่อยครับ&quot;</p><p><strong>โค้ดตัวอย่าง:</strong></p><pre>public class GetEntityQuery : IRequest&lt;MyEntity&gt;<br>{<br>    public int Id { get; set; }<br>}</pre><pre>public class GetEntityQueryHandler : IRequestHandler&lt;GetEntityQuery, MyEntity&gt;<br>{<br>    private readonly MyDbContext _context;<br>    <br>    public GetEntityQueryHandler(MyDbContext context)<br>    {<br>        _context = context;<br>    }<br>    public async Task&lt;MyEntity&gt; Handle(GetEntityQuery request, CancellationToken cancellationToken)<br>    {<br>        return await _context.MyEntities.FindAsync(request.Id);<br>    }<br>}</pre><h3>สรุป</h3><p>การเขียน prompt ที่ดีสำหรับการทำงานกับ AI โดยเฉพาะในด้านการเขียนโปรแกรม C# .NET Core 8 มีความสำคัญอย่างมากในการให้ข้อมูลที่ชัดเจนและมีประสิทธิภาพ ด้วยการระบุปัญหาและคำถามที่ชัดเจน การให้ข้อมูลพื้นฐานและบริบทที่จำเป็น การใช้ภาษาที่ตรงไปตรงมา และการเปิดรับคำถามเพิ่มเติมจะช่วยให้ AI สามารถให้ความช่วยเหลือที่ตรงตามความต้องการของคุณได้อย่างมีประสิทธิภาพ การปฏิบัติตามข้อแนะนำเหล่านี้จะช่วยเพิ่มความแม่นยำในการตอบสนองและช่วยให้การพัฒนาโปรแกรมของคุณเป็นไปได้อย่างราบรื่น</p><p>หวังว่าบทความนี้จะช่วยให้คุณสามารถสร้าง prompt ที่มีประสิทธิภาพมากยิ่งขึ้น และทำให้การทำงานร่วมกับ AI เป็นไปอย่างราบรื่นและมีประสิทธิผลครับ!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f43699c2b10" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cnxdevsoft/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99-prompt-%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%94%E0%B8%B5%E0%B9%80%E0%B8%9E%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B9%83%E0%B8%AB%E0%B9%89-ai-%E0%B9%80%E0%B8%82%E0%B9%89%E0%B8%B2%E0%B9%83%E0%B8%88%E0%B9%80%E0%B8%81%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%A7%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99%E0%B9%82%E0%B8%9B%E0%B8%A3%E0%B9%81%E0%B8%81%E0%B8%A3%E0%B8%A1%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-c-net-core-8-3f43699c2b10">การเขียน Prompt ที่ดีเพื่อให้ AI เข้าใจเกี่ยวกับการเขียนโปรแกรมด้วย C# .NET Core 8</a> was originally published in <a href="https://medium.com/cnxdevsoft">CnxDevSoft</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[8 ขั้นตอน เพิ่ม Productivity ในการออกแบบเว็บไซด์ CMS]]></title>
            <link>https://kwangtungtaesuji.medium.com/8-%E0%B8%82%E0%B8%B1%E0%B9%89%E0%B8%99%E0%B8%95%E0%B8%AD%E0%B8%99-%E0%B9%80%E0%B8%9E%E0%B8%B4%E0%B9%88%E0%B8%A1-productivity-%E0%B9%83%E0%B8%99%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%AD%E0%B8%AD%E0%B8%81%E0%B9%81%E0%B8%9A%E0%B8%9A%E0%B9%80%E0%B8%A7%E0%B9%87%E0%B8%9A%E0%B9%84%E0%B8%8B%E0%B8%94%E0%B9%8C-cms-aa7c996b5fb0?source=rss-9a7ccd3d53f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa7c996b5fb0</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[cms]]></category>
            <category><![CDATA[design-process]]></category>
            <category><![CDATA[umbraco]]></category>
            <category><![CDATA[orchard-core]]></category>
            <dc:creator><![CDATA[KwangTung Taesuji]]></dc:creator>
            <pubDate>Wed, 03 Aug 2022 16:03:04 GMT</pubDate>
            <atom:updated>2022-08-04T11:37:35.672Z</atom:updated>
            <content:encoded><![CDATA[<p>การพัฒนาเว็บไซด์ด้วย CMS (Content Management System) นั้นเป็นการพัฒนาเว็บไซด์โดยเรามุ่งเน้นความไว และคุณภาพของระบบ โดยใช้ฟีเจอร์บางส่วนจาก CMS ให้มากที่สุดเพื่อลดระยะเวลาในการพัฒนาและตอบสนองความต้องการของลูกค้าให้เร็วที่สุด</p><p>การออกแบบหน้าจอก็มีส่วนสำคัญมาก ไม่ว่าจะเป็นการเข้าถึงง่าย, ความคงที่ของการออกแบบ, ความสม่ำเสมอ และการวางเนื้อหาบทความ โดยทั่วไปแล้วการพัฒนา CMS จะใช้ Template ที่ติดมากับ CMS เจ้านั้น ๆ เป็นหลัก เช่น Wordpress, <a href="https://umbraco.com/">Umbraco</a>, <a href="http://orchardcore.net/">OrchardCore </a>เป็นต้น</p><p>หากลูกค้ามีความต้องการที่จะออกแบบเทรมเพลต Template หรือหน้าจอ แบบ customize เองนั้น เราจะต้องอาศัยแนวคิดและใช้วิธีจัดการทางด้านเทคนิคค่อนข้างมาก</p><p>สิ่งสำคัญที่เราจะต้องคำนึงถึง คือ ความพอใจของลูกค้า, ระยะเวลา และข้อผิดพลาดที่อาจจะเกิดขึ้นได้ เช่น<br>1. ต้องออกแบบหน้าจอทั้ง Desktop, Tablet, Mobile ทำให้ใช้เวลาในโครงการมาก<br>2. ถ้าไม่ใช้ Design Frameworks ที่ดี จะทำให้แสดงผล Web Responsive ไม่ได้ทุกจุด จะต้องแก้ไขเป็นจุด ๆ ไป<br>3. ลูกค้ามีการเปลี่ยนแปลงหน้าจอบ่อย ๆ ทำให้ต้องมีการปรับแก้ไขเรื่อยๆ<br>นี่เป็นผลกระทบบางส่วนจากการวางแผน และออกแบบไม่ดี เรามีเทคนิคมานำเสนอแบบง่าย ๆ ดังนี้</p><p><strong>1.การทบทวนเอกสารความต้องการ Requirement <br></strong>เริ่มจากวิเคราะห์และกำหนดฟีเจอร์ของระบบว่ามีอะไรบ้าง อาจจะทำรายการเป็น checklist ไว้ หรือจะวาด หรือเขียนโพสอิทแปะไว้ก็ได้<br>(ขั้นตอนนี้เราจะยังไม่ลง design tools หรือ figma แต่เป็นการเอาไอเดียมาคุยกันภายในทีมหรือคุยกับลูกค้าก่อน จะทำให้มองเห็นภาพ และสามารถเสริมจุดแข็ง ลดจุดอ่อนได้ อีกทั้งได้ตรวจสอบความเข้าใจและแนวคิดของผู้ออกแบบได้)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Icea4uF-oP5nlnAY.jpg" /></figure><p><strong>2.สร้าง wireframe กำหนดแค่ Box เป็นตัวแทนของฟีเจอร์</strong><br>เน้นวางตำแหน่งของฟีเจอร์ และกำหนดความสัมพันธ์ของการเข้าถึงหน้าต่าง ๆ มี page redirect action (รู้ว่า จุดไหนทำอะไร และไปไหน) สามารถปรับเปลี่ยนได้เรื่อยๆ หากมีการเปลี่ยนแปลงจะเน้นขยับ box เท่านั้น <br>(ขั้นตอนนี้ลงสามารถเขียนในกระดาษ หรือใช้ design tools หรือ figma ได้เลย)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/0*yxNY1KetVS7bvNan.png" /></figure><p>ซึ่งถ้าการ ดราฟ หรือ ร่างแบบ wireframe ถ้าอ้างอิงมาจาก layout จริง ๆ ที่จะพัฒนาแล้วจะทำให้ลดเวลาการแก้ไขเป็นอย่างมาก</p><p><strong>3. ศึกษา Theme ของ CMS ตัวที่เราคาดว่าจะพัฒนาว่ามีตัวไหนที่ตอบโจทย์แนวคิดเราหรือไม่ </strong><br>ถ้า Theme นั้น ๆ มี responsive ก็จะยิ่งดีและทำให้เราทำงานง่ายขึ้น<br>ซึ่งจะเป็น theme ที่ติดมากับ cms หรือ theme ที่นักพัฒนาคนอื่น ๆ ทำไว้แล้วก็ได้ (เน้น opensource ก่อน)<br>ถ้ามีก็หยิบมาเป็น Master Template</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*O_P3TAQzCuPgvR1y.png" /></figure><p><strong>4. หากข้อ 3 ลองศึกษาแล้วไม่มีจริง ๆ ก็ให้ลองเลือก Design frameworks</strong> <br>เช่น bootstrap, Ant Design หรือ tailwind ตัวใดๆ ตัวนึงและตัวเดียวเท่านั้น มาเป็น Master Template ก่อน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IslH5CbgtpYnd6Dj.png" /></figure><p><strong>5. ใช้ Master Template ให้เกิดประโยชน์สูงสุด</strong><br>เมื่อมี Master Template<strong> </strong>ต้นแบบ แล้ว ให้พยายามใช้ layout, component, element, syntax ของตัวมันให้มากที่สุด และไปในทิศทางเดียวกัน ไม่มีการซ้อน css frameworks</p><p><strong>6.สามารถเพิ่มเติม Layout ที่ไม่มีใน Master Template ได้</strong> <br>ในกรณีที่ต้องการพัฒนาเพิ่ม ให้เราประเมินการแก้ไขไว้ไม่ควรเกิน 40% ของต้นแบบที่เรามีอยู่ ในส่วนที่เป็นฟีเจอร์ หรือเป็นส่วนที่ต้องใช้เทคนิคเฉพาะ ให้ออกแบบโดยยังคงยึด Layout จาก Master Template ให้มากที่สุด<br>เช่น <br><strong>หน้าทั่ว ๆ ไป</strong> กว่า 60% ต้องใช้โครงสร้างจาก Master Template ได้ <br>เช่น Header — [Body1] — Footer</p><p><strong>หน้าพิเศษ</strong> ก็ควรใช้โครงสร้างจาก Master Template ได้ <br>เช่น Header — [….] — Footer แต่เราสามารถปรับ Body1 เป็น Body2 ได้</p><p>7. ถ้าข้อ 2–5 ไม่ตอบโจทย์ลูกค้า ก็จะออกแบบเอง design เอง พยายามไม่ complex มากเกินไป</p><p>8. สร้าง Design guideline กำหนด element ให้ตรงกันทุกตัว ไม่ว่าจะ button, space, font-size เป็นต้น</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XMmr0qwMGsoorEqw.png" /></figure><p><strong>สรุป</strong></p><p>การออกแบบเว็บไซด์เราจะต้องคำนึงถึง 3 องค์ประกอบที่สำคัญ คือ <strong>จุดมุ่งหมายการออกแบบเว็บไซต์, การสื่อสารเนื้อหาภายในเว็บไซด์ที่ชัดเจน และการแสดงผลบนอุปกรณ์ต่าง ๆ <br></strong>ดังนั้นเพื่อการออกแบบที่ตรงเป้าหมาย, ลดระยะเวลาในการพัฒนา และช่วยเรื่องการสื่อสารระหว่างลูกค้า และทีมงาน เราควรกำหนดและหาวิธีการที่จะขจัดหรือลดปัญหาที่จะเกิดขึ้นให้ได้มากที่สุด</p><p>วิธีที่แนะนำเป็นแค่ส่วนหนึ่งและประสบการณ์จากการทำงานการออกแบบหน้าจอเว็บไซด์ด้วย CMS จากผู้เขียนเท่านั้น</p><p>หากใครมีเทคนิคดี ๆ สามารถแนะนำเข้ามาได้เลยครับ</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa7c996b5fb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Orchard Core ก็มี Helper]]></title>
            <link>https://kwangtungtaesuji.medium.com/orchard-core-%E0%B8%81%E0%B9%87%E0%B8%A1%E0%B8%B5-helper-e1aed452c7be?source=rss-9a7ccd3d53f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1aed452c7be</guid>
            <category><![CDATA[cms-platform]]></category>
            <category><![CDATA[iorchardhelper]]></category>
            <category><![CDATA[cms-development]]></category>
            <category><![CDATA[orchard-core]]></category>
            <category><![CDATA[net-core-6]]></category>
            <dc:creator><![CDATA[KwangTung Taesuji]]></dc:creator>
            <pubDate>Thu, 28 Jul 2022 09:39:41 GMT</pubDate>
            <atom:updated>2022-07-28T09:39:41.289Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GHifFQcM6gVunr91tVB8Dw.png" /></figure><p>การพัฒนา Orchard Core นอกจากจะใช้ Orchard Core API แล้ว เรายังสามารถใช้ไลบารี่ (Library) ที่เป็นตัวช่วยในการเข้าถึงข้อมูลส่วนที่มาจาก CMS ได้อีกด้วย โดยจะต้องติดตั้ง OrchardCore Abstractions ผ่าน Nuget ดังนี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*qk9ANnhuCS4PAPwSlvbPuA.png" /></figure><p>หรือจะลองเข้าไปค้นหา Nuget ของ Orchard Core ได้ที่</p><p><a href="https://www.nuget.org/packages?q=OrchardCore">NuGet Gallery | Packages matching OrchardCore</a></p><p>เมื่อทำการติดตั้งแล้วสามารถ using Orchard Helper ได้ทั้ง 2 ส่วน คือ ส่วนของ Razor page หรือส่วนของ C# Class ดังนี้</p><h4><strong>1. วิธีการ using ในส่วนของ Razor page</strong></h4><p>เพิ่มคำสั่ง Dependency Injection (DI) ของ IOrchardHelper ไว้ที่ด้านบนของ Razor page และกำหนดตัวแปร Variable เพื่อนำไปใช้ในส่วนอื่น ๆ ของเพจนี้ต่อไป</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*V9jGMTvTuCdbkDzTQ-Pqag.png" /></figure><h4><strong>2. วิธีการ using ส่วนของ C# Class</strong></h4><p>เพิ่มคำสั่งประกาศการใช้งานของ Content Management ของ Orchard โดยใช้คำสั่งดังนี้ using OrchardCore.ContentManagement ไว้ที่ด้านบนใน Controller.cs ซึ่งจะเป็นไฟล์ C#</p><p>จากนั้นเพิ่มโค้ด Dependency Injection (DI) ที่เป็นส่วน IOrchardHelper และเรียกใช้ DI ผ่าน Constructor ของ Controller.cs หลังจากนั้นเราจะสามารถใช้ Helper ใน Method ต่าง ๆ ใน Controller ได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*x8dMa3RAHbEGi0DulYPyAQ.png" /></figure><h4><strong>ตัวอย่าง เมธอดของ IOrchardHelper ที่น่าสนใจมีดังนี้</strong></h4><p><strong>1.</strong> <strong>GetContentItemByIdAsync(string contentItemId, bool latest = false)</strong></p><p>ใช้สำหรับการเรียกดูข้อมูลจาก ContentItem โดยส่งพารามิเตอร์ที่ชื่อว่า contentItemId เข้าไป อาจจะกำหนดสถานะของข้อมูลว่าล่าสุดหรือไม่ โดยใช้พารามิเตอร์ latest</p><p>ผลลัพธ์ คือ จะได้ข้อมูล ContentItem ตาม contentItemId ที่ระบุเพียง 1 ข้อมูลเท่านั้น</p><p><strong>2.</strong> <strong>GetContentItemsByIdAsync(IEnumerable&lt;string&gt; contentItemIds, bool latest = false)</strong></p><p>ใช้สำหรับการเรียกดูข้อมูลจาก ContentItem โดยส่งพารามิเตอร์ที่ชื่อว่า contentItemIds ที่มีลักษณะเป็นชุดของ ContentItemId หลาย ๆ ตัวเข้าไป อาจจะกำหนดสถานะของข้อมูลว่าล่าสุดหรือไม่ โดยใช้พารามิเตอร์ latest</p><p>ผลลัพธ์ คือ จะได้ข้อมูล ContentItem ตาม contentItemId ที่ระบุได้หลายข้อมูล</p><p><strong>3.</strong> <strong>SanitizeHtml(string html)</strong></p><p>ใช้สำหรับการเปลี่ยนข้อความที่อยู่ในรูปแบบ string ยาว ๆ ให้กลายเป็น Html จากตัวอย่าง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*MDUr-2EJs63RA4r1Z4Xy0w.png" /></figure><p>ผลลัพธ์ที่ได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*QQ1OKD8rdCKg6D1sOsexmA.png" /></figure><p><strong>4.</strong> <strong>AssetUrl(string assetPath, int? width = null, int? height = null, ResizeMode resizeMode = ResizeMode.Undefined, bool appendVersion = false)</strong></p><p>ใช้สำหรับการเรียกดูข้อมูลรูปภาพจาก Media โดยส่งพารามิเตอร์ assetPath และสามารถกำหนดขนาด width ของรูปภาพ, กำหนดโหมดในการ resize รูปภาพ หรือส่งพารามิเตอร์ appendVersion เพื่อใช้กำหนดเวอร์ชั่นที่ต้องการได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*Gu2obbx-k5EQruo3wZqV5A.png" /></figure><p>ผลลัพธ์ที่ได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*xoHX8lnQFYp4VPC8DAfyIw.png" /></figure><p><strong>5. CultureName()</strong></p><p>ใช้สำหรับการเรียกดูข้อมูล Culture เช่น th-TH คือ ภาษาไทย, en-US คือ ภาษาอังกฤษ เป็นต้น</p><p><strong>ตัวอย่างข้อมูลที่ได้หลังจากการดึงข้อมูลจาก IOrchardHelper</strong></p><p>1. การแสดงผลผ่านคำสั่ง @<strong>contentPage</strong>.Content.FlowPart ที่หน้า Razor Page ซึ่งจะอยู่ในรูปแบบ JSON</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*WWICwxNQ20mSg0iPEo5cgg.png" /></figure><p>2. การแสดงผลผ่านคำสั่ง @<strong>contentPage</strong>.ContentItem.DisplayText ที่หน้า Razor Page ซึ่งจะอยู่ในรูปแบบ Object</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*eFVJTpvu6eKjZ8pShST43w.png" /></figure><p>3. การแสดงผลผ่าน output ในระหว่างที่ทำการใช้ Debug tools ใน Visual Studio</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*BD7t9CGhqxPZsMP2QoLvgA.png" /></figure><h3>ถ้าต้องการศึกษาเพิ่มเติม สามารถดูเมธอดได้ที่</h3><p><a href="https://docs.orchardcore.net/en/dev/docs/reference/core/Razor/">Razor Helpers - Orchard Core Documentation</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1aed452c7be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[สร้าง Tab ด้วย Placement ใน Orchard Core]]></title>
            <link>https://kwangtungtaesuji.medium.com/%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-tab-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-placement-%E0%B9%83%E0%B8%99-orchard-core-19f4a51eafcb?source=rss-9a7ccd3d53f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/19f4a51eafcb</guid>
            <category><![CDATA[orchard-core]]></category>
            <dc:creator><![CDATA[KwangTung Taesuji]]></dc:creator>
            <pubDate>Thu, 03 Mar 2022 15:00:44 GMT</pubDate>
            <atom:updated>2022-03-03T15:03:03.826Z</atom:updated>
            <content:encoded><![CDATA[<h4>บทความนี้จะแนะนำการใช้ Placement ของ Orchard Core เพื่อจัดกลุ่มข้อมูลใน Content-Type ให้สามารถแสดงผลข้อมูลในรูปแบบต่างๆ ได้</h4><h4>Orchard Core สามารถสร้าง properties ใน Content-Type ได้หลายรูปแบบไม่ว่า จะเป็นแบบ field ที่มี type รองรับ เช่น media field, text field, Url field เป็นต้น หรือจะเป็น A Part ที่ถูก build จาก CMS Module หรือ A Part ที่เราสร้างเองภายใน CMS หรือกำหนดกลุ่มของ properties เอาไว้</h4><p>ปกติ properties เหล่านี้จะแสดงแบบเรียงจากบนลงล่าง เมื่อเราสร้าง Content Item หากใน Content-Type มี properties จำนวนมากอาจจะทำให้การจัดกลุ่มข้อมูลหรือ User ใช้งานยาก</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/0*K7a6lk7IM-EHox7D.png" /><figcaption>Orchard core</figcaption></figure><p><strong>ตัวอย่างหน้าจอที่มีฟิลด์จำนวนมาก</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*VweEgRkfDXWo7mT6aTv4bg.png" /><figcaption>หน้าจอที่มี Properties แสดงเป็นจำนวนมาก</figcaption></figure><h3>บทความนี้จะแนะนำการใช้ Placement ของ Orchard Core เพื่อจัดกลุ่มข้อมูลใน Content-Type</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/245/1*-wCXSHJBBLHY5Zf_sDV29g.png" /></figure><h4>โดยเราจะย้าย Permalink ที่ตอนนี้จะแสดงอยู่ด้านล่างของ Field &gt; Redirect URL ไปไว้ใน Tab ใหม่ที่ชื่อ Properities</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*PhLJNMIzZ3-GolwYACxorA.png" /></figure><h3>How to use simple PLACEMENT</h3><p>1.ให้เข้าไปที่ Placement ในแต่ละชนิดของ control เช่น Part Control, Field Control (จากตัวอย่างเข้าไปที่ Autoroute)<br>เมื่อเข้าไปแล้วให้คลิกเลือก Edit Placements ที่เป็น drop down list และเลือก Placement in admin editor for ….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*FZbkm4ZQ8F_TpQnVOjIQLA.png" /></figure><p>2.ใน Placement จะระบุประเภท Shape Type เอาไว้ เช่น AutoroutePart_Edit จะเป็นตัวกำหนดการแสดงผล field ที่ชื่อว่า Permalink ใน Content Item</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*Ku1Jsgwaw4KNlmcy-LwbuQ.png" /></figure><p>3.ให้เรากำหนดค่าลงที่ field ชื่อว่า <strong>Place </strong>ตามตัวอย่าง syntax นี้ คือ</p><p>“place”: “<strong>Parts:0#Properties</strong>;<strong>0</strong>”</p><p><strong>Parts:0</strong> &gt;&gt; การกำหนด Parts Control ตัวแรก<br><strong>#</strong> &gt;&gt; แสดงผลรูปแบบ Tabs<br><strong>Properties</strong> &gt;&gt; ชื่อ Tab ที่จะสร้างขึ้นมาใหม่<br><strong>0</strong> &gt;&gt; ในตำแหน่งแรก</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*eLkqsUcM9Ywmlofft9PUAQ.png" /></figure><p>4.เมื่อกด Save แล้วกลับมาที่ Content Item ของ Blog Post หน้าจอจะแสดง tab ชื่อว่า Properties</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*dtThWbMqGQVGMgSuPVIsBw.png" /></figure><p>5.เมื่อกด tab Properites จะเห็น field ที่ชื่อ Permalink แสดงอยู่</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*1RADkEp_1K_qsvbVTPXqsA.png" /></figure><p>ตัว Placement รองรับการแสดงผลรูปแบบอื่น ๆ เช่น Card ให้เราปรับ Syntax เป็น</p><p>“place”: “<strong>Parts:0%Properties</strong>;<strong>0</strong>” จะได้รูปแบบ Layout ที่สามารถ expand/collapse ได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*FKS8grQ7yQdlJ20p0ksRow.png" /></figure><p>หรือถ้าปรับ syntax “|” ให้แสดงเป็น Column และใช้ “_ตามด้วยตัวเลขเพื่อกำหนดขนาดของ column” เช่น</p><p><strong>“place”: “Parts:0|propeties_9” </strong>จะได้รูปแบบ Layout ที่สามารถแสดงผลเป็น column ด้านซ้าย 30 % และ ด้านขวา 70 % (col-md-9 ของ Bootstap)ได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*l27ZtTBzB-xuRuAj0YvVtw.png" /></figure><p>สรุปเราสามารถจัดการและจัดกลุ่มการแสดงผลข้อมูลใน Content Item ได้ด้วย Placement ที่ติดมากับตัว Orchard Core ถ้าต้องการศึกษาเพิ่มเติมสามารถเข้าไปที่ link ด้านล่างได้เลย</p><p><strong>ที่มา</strong><br><a href="https://docs.orchardcore.net/en/dev/docs/reference/core/Placement/">https://docs.orchardcore.net/en/dev/docs/reference/core/Placement</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19f4a51eafcb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[วิธีการบันทึก Description ใน Database Column ของ SQL Server ผ่าน EF Core Code First]]></title>
            <link>https://kwangtungtaesuji.medium.com/%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B8%B1%E0%B8%99%E0%B8%97%E0%B8%B6%E0%B8%81-description-%E0%B9%83%E0%B8%99-database-column-%E0%B8%82%E0%B8%AD%E0%B8%87-sql-server-%E0%B8%9C%E0%B9%88%E0%B8%B2%E0%B8%99-ef-core-code-first-12a474ba45c4?source=rss-9a7ccd3d53f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/12a474ba45c4</guid>
            <category><![CDATA[ef-core]]></category>
            <category><![CDATA[sql-server]]></category>
            <dc:creator><![CDATA[KwangTung Taesuji]]></dc:creator>
            <pubDate>Tue, 01 Feb 2022 06:42:54 GMT</pubDate>
            <atom:updated>2022-02-01T06:44:17.736Z</atom:updated>
            <content:encoded><![CDATA[<p>บทความเดือนกุมภาพันธ์ 2565 วันนี้มาเล่าการใช้งาน ef core code first เกี่ยวกับการบันทึก description ของแต่ละ column ไว้ใน database เพื่ออธิบายความหมายของ column table นั้น ๆ และช่วยให้นำไปใช้งานต่อได้ง่ายขึ้น</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*qXTIJGbuHw1EGvow.jpeg" /></figure><p>ก่อนอื่นมารู้จัก property ที่ชื่อว่า Description ใน SQL Server กันก่อน เมื่อกดเข้าไปใน table ที่สร้างไว้จะสังเกตเห็นว่ามี column และคลิกขวาที่ column จะมีปุ่ม modify</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*3Q8-dXhFgF0itrzC5fD9Hg.png" /></figure><p>เราสามารถกดเข้าไปดู column propeties ได้ จะเห็นว่ามี property ที่ชื่อว่า Description ตรงจุดนี้เราสามารถแก้ไขได้เลย <strong><em>(แต่มันไม่เท่!)</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*TLyCr7KeimrzMd74OeVUIA.png" /></figure><p>ใน EF CORE เราสามารถสร้าง Migration ด้วย code first และมี Attribute ที่ชื่อว่า HasComment รองรับอยู่ ซึ่งจริง ๆ แล้วเราก็สามารถระบุคำอธิบายที่ต้องการลงใน HasComment ได้เลย ศึกษา EF Migration เพิ่มเติมได้ที่</p><p><a href="https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/">https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations</a></p><h4>จะดีกว่าไหม? หากเราจะรวบรวมข้อความไว้ที่จุดเดียว แล้วใช้ Descrtipion ที่เป็น Annotation ของ entity properties ใน Entiy Class.cs</h4><p>ตัวอย่าง ALERT class ที่ถูกสร้างขึ้นไว้ใน class.cs จากนั้นเราเพิ่ม [Description(“ข้อความ”)]</p><p><strong>อย่าลืม</strong> using System.ComponentModel; ด้วยนะ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*SPQ3BkO8mk0Fd1UKMRSjXQ.png" /></figure><p>วิธีการอัพเดท builder ให้สร้าง method: UpdateBuilder ขึ้นมา เราจะดึงข้อมูล Description มาไว้ใน HasComment</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*tokPbaxpwJXEh43YtUdWMg.png" /></figure><p>ภายใน method หากมีการเรียกข้าม assembly หรือ dll อื่น ให้ระบุ namespace ลงในตัวแปร filter</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HnXIW8Di0l_agn6hlLFySw.png" /></figure><p>ใช้คำสั่ง <strong>command</strong>: add-migration<br>หาก add ผิดหรือต้องการลบ ให้ใช้คำสั่ง command: remove-migration</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*ueKw8VXDkvPEU9MdnY01XQ.png" /></figure><p>เราจะได้ไฟล์ migration แบบนี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*i7Wb2DpwGg1LEDbf5yRXyA.png" /></figure><p>ใช้คำสั่ง <strong>command</strong>: update database</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/1*lTjzMg2IzwSXSzioK5eySg.png" /></figure><p>เมื่อเรา run migration เสร็จ เราจะได้ description ที่ถูกบันทึกไว้แต่ละ column ไว้ใน database ดังนี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*fHu_xhJRddsU_lHb2oRypQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*VTqAJNi5pG1k7ZKHL1Gpdg.png" /></figure><p>สุดท้ายนี้ ใน ef core มี entity properites สำหรับใช้ควบคู่กับ entity class สามารถศึกษาเพิ่มเติมได้ที่</p><p><a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.relationalentitytypebuilderextensions.canexcludetablefrommigrations">RelationalEntityTypeBuilderExtensions.CanExcludeTableFromMigrations(IConventionEntityTypeBuilder, Nullable , Boolean) Method (Microsoft.EntityFrameworkCore)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12a474ba45c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OrchardCore การสร้าง CMS Data และวิธีการดึงข้อมูลแบบทั้ง Content-Type]]></title>
            <link>https://kwangtungtaesuji.medium.com/orchardcore-%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-cms-data-%E0%B9%81%E0%B8%A5%E0%B8%B0%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%94%E0%B8%B6%E0%B8%87%E0%B8%82%E0%B9%89%E0%B8%AD%E0%B8%A1%E0%B8%B9%E0%B8%A5%E0%B9%81%E0%B8%9A%E0%B8%9A%E0%B8%97%E0%B8%B1%E0%B9%89%E0%B8%87-content-type-f62ee7d3b2df?source=rss-9a7ccd3d53f7------2</link>
            <guid isPermaLink="false">https://medium.com/p/f62ee7d3b2df</guid>
            <category><![CDATA[orchard-core]]></category>
            <dc:creator><![CDATA[KwangTung Taesuji]]></dc:creator>
            <pubDate>Wed, 26 Jan 2022 02:49:37 GMT</pubDate>
            <atom:updated>2022-01-26T03:15:38.380Z</atom:updated>
            <content:encoded><![CDATA[<p>ORCHARD CORE เป็น CMS ทางฝั่ง Microsoft Technology สามารถเข้าไปดู version ล่าสุดได้ที่ GitHub</p><p><a href="https://github.com/OrchardCMS/OrchardCore">GitHub - OrchardCMS/OrchardCore: Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9DI7p3PBhM1XkM8q9ks_QA.png" /></figure><p>ในบทความนี้จะเป็นการแนะนำการสร้าง content type ในระบบ admin เพื่อที่จะทำเป็นข้อมูล Data และเรียกใช้ในหน้าจอ (Page) หรือส่งผ่าน API</p><p><em>(ผู้ที่สนใจจะลองเล่น ต้องรู้เบื้องต้นการใช้งาน admin และการสร้าง page cshtml ของ orchard core มาก่อนแล้ว)</em></p><p>1.ไปที่ menu:Content Definition แล้วสร้าง content type และกำหนดฟิลด์ที่ต้องการ ยกตัวอย่าง การบันทึกข้อมูลสถานที่ และมีข้อมูลพิกัดตำแหน่ง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*3iWJeYM4SL93H_HGEtu5Mg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TLIvaD350-VnrUIn43RRkw.png" /></figure><p>2. ไปที่ menu:Content Types สร้างข้อมูล Data เก็บไว้เป็น content item collections</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*esOuiuzcdKIMzAXLExQmbg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*LU2HykbIPgv5xUxVFgXiYQ.png" /></figure><p>3.ใช้ orchard helper เรียก method <strong>GetRecentContentItemsByContentTypeAsync </strong>และส่งชื่อ technical name ไปค้นหา</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*-v_JPeri-os9Z7pGlguKiA.png" /></figure><p>var sunLocation = await Orchard.GetRecentContentItemsByContentTypeAsync(”SunLocation”);</p><p>4. เมื่อเรียกใช้ method จะได้ข้อมูลที่สร้างไว้ใน admin แบบเป็น list สามารถนำไปใช้งานต่อได้ วิธีการนี้ใช้ได้ทั้งใน page cshtml และ code C#</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R-OU2-tGGvvo-7MHSF4qsg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ZSAyvhqd5q5TLnVa66bkw.png" /></figure><p>นี่เป็นส่วนหนึ่งของการพัฒนา web ด้วย ORCHARD CORE อยากสนุกกับ web application แบบ cms ของฝั่ง .NET สามารถเข้าไปดูเพิ่มเติมได้ที่ <a href="https://orchardcore.net/">https://orchardcore.net/</a></p><p><a href="https://docs.orchardcore.net/en/latest/">Orchard Core Documentation</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f62ee7d3b2df" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>