Skip to content

Instantly share code, notes, and snippets.

View Program.cs
using NHibernate;
using NHibernate.Cfg;
using NHibernate.Tool.hbm2ddl;
using Concepts.Core;
namespace Concepts.Tasks
{
class Program
{
public static void createDatabase()
@Itslet
Itslet / Global.asax.cs
Created Dec 10, 2010
Piece of Global.asax.cs for Eloquera
View Global.asax.cs
public class MvcApplication : NinjectHttpApplication
{
public static DB db = new DB("server=(local);password=;options=none;");
private static void openSession()
{
if (File.Exists(@"c:\temp\db\iSay.eq")) {
db.OpenDatabase("iSay");
db.RegisterType(typeof(iSay.Story));
@Itslet
Itslet / Sessionfactory.cs
Created Jan 9, 2011
Db4o Sessionfactory
View Sessionfactory.cs
using Db4objects.Db4o;
using System.Linq;
using Db4objects.Db4o.Linq;
using System.Web;
using System.IO;
using System;
using System.Collections.Generic;
namespace Web.Infrastructure {
View Db4oTest.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Web.Infrastructure;
using Core;
namespace Test
{
View VirtualServer.cs
namespace Core
{
public class BladeServer
{
public string Hostname { get; set;}
public string ServerRole { get; set; }
public string IPAddress { get; set; }
public string OS { get; set; }
public BladeChassis BladeChassis { get; set; }
View ISession.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Web.Infrastructure
{
public interface ISession:IDisposable {
void CommitChanges();
Db4objects.Db4o.IObjectContainer Container { get; }
@Itslet
Itslet / Db4oSession.cs
Created Jan 9, 2011
Unit of Work for Db4o
View Db4oSession.cs
using Db4objects.Db4o;
using System.Linq;
using Db4objects.Db4o.Linq;
using System.Web;
using System.IO;
using System;
using System.Collections.Generic;
namespace Web.Infrastructure
{
View WindsorControllerFactory.cs
using Castle;
using Castle.MicroKernel;
using System.Web.Mvc;
using System.Web.Routing;
namespace CastleDemo.Plumbing
{
public class WindsorControllerFactory : DefaultControllerFactory
{
private readonly IKernel kernel;
View ControllersInstaller.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Castle.MicroKernel.Registration;
using Castle.Windsor;
using Castle.MicroKernel.SubSystems.Configuration;
using System.Web.Mvc;
using CastleDemo.Controllers;
View globalasax.cs
using Castle.Windsor;
using Castle.Windsor.Installer;
using CastleDemo.Plumbing;
using Castle.MicroKernel.Registration;
namespace CastleDemo
{
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
// visit http://go.microsoft.com/?LinkId=9394801