This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace WoodConsultingPractice | |
{ | |
public interface IToddWood | |
{ | |
IEnumerable<Result> Work<T>(T challenge); | |
IEnumerable<Memory> Life(Action action); | |
Post Blog<T>(Result knowledge, Memory experience, T content); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using NUnit.Framework; | |
namespace StackOverflowQuestionsTests | |
{ | |
[TestFixture] | |
class LinqExamples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
CREATE TABLE [dbo].[Organization]( | |
[Id] [uniqueidentifier] NOT NULL, | |
[ParentId] [uniqueidentifier] NULL, | |
[OrganizationCode] [nvarchar](10) NOT NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
using PetaPoco; | |
namespace PetaPocoHierarchy.Models | |
{ | |
public class Organization | |
{ | |
public Guid Id { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using PetaPocoHierarchy.Models; | |
namespace PetaPocoHierarchy.Services | |
{ | |
public class OrganizationRepository : Repository, IOrganizationRepository | |
{ | |
public IEnumerable<Organization> GetAll() | |
{ | |
// SELECT a row of data containing an Organization and Parent Organization |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PetaPocoHierarchy.Models; | |
namespace PetaPocoHierarchy.Services | |
{ | |
/// <summary> | |
/// Set Organization Parent in the Organization Hierarchy | |
/// </summary> | |
/// <remarks> | |
/// Based on logic for mapping demo: http://www.toptensoftware.com/Articles/115/PetaPoco-Mapping-One-to-Many-and-Many-to-One-Relationships | |
/// </remarks> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace DoddleReport | |
{ | |
public static class DynamicReportSourceExtensions | |
{ | |
public static IReportSource ToReportSource(this IEnumerable<dynamic> source) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using DoddleReport; | |
namespace Hasc.Web.Helpers | |
{ | |
public static class DynamicReportSourceExtensions | |
{ | |
public static IReportSource ToReportSource(this IEnumerable<dynamic> source) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using PetaPoco; | |
namespace PetaPocoPivot.Services | |
{ | |
public class Repository : IRepository | |
{ | |
private readonly Database _database = new Database("AdventureWorks"); | |
public IEnumerable<dynamic> GetEmployeeReport() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Web.Mvc; | |
using DoddleReport; | |
using DoddleReport.Web; | |
using PetaPocoPivot.Services; | |
namespace PetaPocoPivot.Controllers | |
{ | |
public class HomeController : Controller | |
{ | |
private readonly IRepository _repository = new Repository(); |
OlderNewer