Skip to content

Instantly share code, notes, and snippets.

View relrod's full-sized avatar

Rick Elrod relrod

View GitHub Profile
namespace Foo
{
class Bar : Controller
{
public ActionResult MyAction(int? id)
{
var ctx = new Models.MyDbContext();
return from x in ctx.MyTable where x.ID == id select x.Name;
}
function last_line_containing($str, $item) {
$lines = split($str, "\n");
foreach($lines as $line)
$ret = stristr($line, $item);
return $ret;
}