Skip to content

Instantly share code, notes, and snippets.

View TWolverson's full-sized avatar
🏠
Working from home

TWolverson

🏠
Working from home
View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Poly
{
enum X
{
public class StreetController : BaseControllerType<Street> {
// is the intention to type these as BaseControllerType<House> or BaseControllerType<BaseEntityType> ?
private readonly HouseController houseController;
private readonly LightController lightController;
public ActionResult Update(Street street){
foreach(var house in street.Houses){
public class CustomersController
{
private readonly IQueryable<Customer> customersQuery;
public CustomersController(IQueryable<Customer> customersQuery)
{
this.customersQuery = customersQuery;
}
public Customer Get(int id)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
using System;
using System.Globalization;
public static class Helpers
{
// this method must be non-async because the caller doesn't understand Tasks
// it also must be static for *reasons*
public static string GetApplicationValue(string appType, string listType, string key)
{
RefreshCache(); // this needs to block so that the cache is refreshed before trying to return a result
// pseudocode
return Cache.SingleOrDefault(item => item.Key == key);
using System;
public class Program
{
public static void Main()
{
var 個 = "";
Console.WriteLine("Hello World");
}
}