Skip to content

Instantly share code, notes, and snippets.

@jfromaniello
Created November 24, 2009 17:08
Show Gist options
  • Save jfromaniello/242025 to your computer and use it in GitHub Desktop.
Save jfromaniello/242025 to your computer and use it in GitHub Desktop.
public interface IDaoReadOnly<T>
{
T Get(object id);
T GetProxy(object id);
void Refresh(T entity);
IEnumerable<T> RetrieveAll();
IEnumerable<T> RetrieveAll(params string[] properties);
IEnumerable<T> Retrieve(Expression<Func<T, bool>> predicate);
IEnumerable<T> Retrieve(Expression<Func<T, bool>> predicate, params string[] properties);
int Count(Expression<Func<T, bool>> predicate);
}
public interface IDao<T> : IDaoReadOnly<T>
{
T MakePersistent(T entity);
void MakeTransient(T entity);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment