<?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 CodersTape on Medium]]></title>
        <description><![CDATA[Stories by CodersTape on Medium]]></description>
        <link>https://medium.com/@codersTape?source=rss-26a28b7e3d5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*MgNms1_5E8NPlJcp.jpg</url>
            <title>Stories by CodersTape on Medium</title>
            <link>https://medium.com/@codersTape?source=rss-26a28b7e3d5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 10:16:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@codersTape/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[MCV CURD Controller sample]]></title>
            <link>https://medium.com/@codersTape/mcv-curd-controller-sample-6c79ccafb580?source=rss-26a28b7e3d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c79ccafb580</guid>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[CodersTape]]></dc:creator>
            <pubDate>Tue, 31 Dec 2019 03:49:42 GMT</pubDate>
            <atom:updated>2019-12-31T03:49:42.070Z</atom:updated>
            <content:encoded><![CDATA[<p>namespace MvcCrud.Controllers<br>{<br> public class CustomerController : Controller<br> {<br> // GET: Customer<br> public ActionResult Index()<br> {<br> using( DBModels db = new DBModels())<br> {<br> return View(db.Customers.ToList());<br> }<br> <br> }</p><p>// GET: Customer/Details/5<br> public ActionResult Details(int id)<br> {<br> using( DBModels db = new DBModels())<br> {<br> return View(db.Customers.Where(x =&gt; x.CustomerID == id).FirstOrDefault()); <br> }<br> <br> }</p><p>// GET: Customer/Create<br> public ActionResult Create()<br> {<br> return View();<br> }</p><p>// POST: Customer/Create<br> [HttpPost]<br> public ActionResult Create( Customer customer)<br> {<br> try<br> {<br> // TODO: Add insert logic here<br> using( DBModels db = new DBModels())<br> {<br> db.Customers.Add(customer);<br> db.SaveChanges();<br> }<br> return RedirectToAction(“Index”);<br> }<br> catch<br> {<br> return View();<br> }<br> }</p><p>// GET: Customer/Edit/5<br> public ActionResult Edit(int id)<br> {<br> using (DBModels db = new DBModels())<br> {<br> return View(db.Customers.Where(x =&gt; x.CustomerID == id).FirstOrDefault());<br> }<br> }</p><p>// POST: Customer/Edit/5<br> [HttpPost]<br> public ActionResult Edit(int id, Customer customer)<br> {<br> try<br> {<br> // TODO: Add update logic here<br> using( DBModels db = new DBModels())<br> {<br> db.Entry(customer).State = EntityState.Modified;<br> db.SaveChanges();<br> }<br> return RedirectToAction(“Index”);<br> }<br> catch<br> {<br> return View();<br> }<br> }</p><p>// GET: Customer/Delete/5<br> public ActionResult Delete(int id)<br> {<br> using (DBModels db = new DBModels())<br> {<br> return View(db.Customers.Where(x =&gt; x.CustomerID == id).FirstOrDefault());<br> }<br> }</p><p>// POST: Customer/Delete/5<br> [HttpPost]<br> public ActionResult Delete(int id, Customer customer)<br> {<br> try<br> {<br> // TODO: Add delete logic here<br> using( DBModels db = new DBModels())<br> {<br> customer = db.Customers.Where(x =&gt; x.CustomerID == id).FirstOrDefault();<br> db.Customers.Remove(customer);<br> db.SaveChanges();<br> }<br> return RedirectToAction(“Index”);<br> }<br> catch<br> {<br> return View();<br> }<br> }<br> }<br>}</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c79ccafb580" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>