Skip to content

Instantly share code, notes, and snippets.

@Itslet
Created January 9, 2011 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Itslet/772052 to your computer and use it in GitHub Desktop.
Save Itslet/772052 to your computer and use it in GitHub Desktop.
Unit of Work
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; }
void Delete<T>(System.Linq.Expressions.Expression<Func<T, bool>> expression);
void Delete<T>(T item);
void DeleteAll<T>();
void Dispose();
T Single<T>(System.Linq.Expressions.Expression<Func<T, bool>> expression);
System.Linq.IQueryable<T> All<T>();
void Save<T>(T item);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment