Skip to content

Instantly share code, notes, and snippets.

/*db.Blogs
.Include("Posts")
.Include("Posts.Comments")
.Where(x => x.Id == 1)
.ToList();*/
SELECT [Project2].[Id] AS [Id],
// Basic interfaces
/// <summary>
/// Wrapper of repository acces
/// </summary>
/// <typeparam name="T"></typeparam>
public interface IDataRepository<T> where T : class
{
/// <summary>
@alfeg
alfeg / gist:878596
Created March 20, 2011 19:37
Topshelf configurator example
RunConfiguration cfg = RunnerConfigurator.New(
x =>
{
x.ConfigureService<SomeClass>(c =>
{
c.WhenStarted(s => s.BootHost());
c.WhenStopped(s => s.ShutDownHost());
c.WhenPaused(s => s.ShutDownHost());
c.WhenContinued(s => s.BootHost());
c.HowToBuildService(
class A
{
private object _locker = new object();
public event EventHandler Bang;
public void Foo()
{
new Thread(() =>
{