CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: C#

Rezpozytorium generyczne 2

171 Views
Copy Code Show/Hide Line Numbers
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
 
namespace Orxxx.Data 
{
    public interface IRepository<T> 
    {
        void Create(T entity);
        void Update(T entity);
        void Delete(T entity);
        void Copy(T source, T target);
        void Flush();
 
        T Get(int id);
        T Get(Expression<Func<T, bool>> predicate);
 
        IQueryable<T> Table { get; }
 
        int Count(Expression<Func<T, bool>> predicate);
        IEnumerable<T> Fetch(Expression<Func<T, bool>> predicate);
        IEnumerable<T> Fetch(Expression<Func<T, bool>> predicate, Action<Orderable<T>> order);
        IEnumerable<T> Fetch(Expression<Func<T, bool>> predicate, Action<Orderable<T>> order, int skip, int count);
 
        [Obsolete]
        void Transaction(Action action);
    }
}
by darek156
  May 07, 2010 @ 1:54am
Tags:

Add a comment


Report Abuse
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate