RepositoryProjectPOC_Revised_-noexe.zip
RepositoryProjectSample
RepositoryProjectSample.suo
RepositoryProjectSample
DataModel.edmx
Helper
Implementations
Entity Framework
Interfaces
obj
x86
Debug
edmxResourcesToEmbed
DataModel.csdl
DataModel.msl
DataModel.ssdl
Properties
RepositoryProjectPOC_Revised_.zip
RepositoryProjectSample.suo
bin
Debug
Release
DataModel.edmx
DesignTimeResolveAssemblyReferencesInput.cache
DataModel.csdl
DataModel.msl
DataModel.ssdl
RepositoryProjectSample.csprojResolveAssemblyReference.cache
RepositoryProjectSample.exe
RepositoryProjectSample.pdb
TempPE
DataModel.Designer.cs.dll
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Objects;
using System.Data.Common;
using System.Collections.ObjectModel;
using System.Linq.Expressions;
namespace RepositoryProjectSample.Interfaces
{
/// <summary>
/// Repository Interface defines the base
/// functionality required by all Repositories.
/// </summary>
/// <typeparam name="T">
/// The entity type that requires a Repository.
/// </typeparam>
public interface IRepository<E>
{
string KeyProperty { get; set; }
void Add(E entity);
void AddOrAttach(E entity);
void DeleteRelatedEntries(E entity);
void DeleteRelatedEntries
(E entity, ObservableCollection<string> keyListOfIgnoreEntites);
void Delete(E entity);
ObjectQuery<E> DoQuery();
ObjectQuery<E> DoQuery(ISpecification<E> where);
ObjectQuery<E> DoQuery(int maximumRows, int startRowIndex);
ObjectQuery<E> DoQuery(Expression<Func<E, object>> sortExpression);
ObjectQuery<E> DoQuery(Expression<Func<E, object>> sortExpression,
int maximumRows, int startRowIndex);
IList<E> SelectAll(string entitySetName);
IList<E> SelectAll();
IList<E> SelectAll(string entitySetName, ISpecification<E> where);
IList<E> SelectAll(ISpecification<E> where);
IList<E> SelectAll(int maximumRows, int startRowIndex);
IList<E> SelectAll(Expression<Func<E, object>> sortExpression);
IList<E> SelectAll(Expression<Func<E, object>> sortExpression,
int maximumRows, int startRowIndex);
E SelectByKey(string Key);
bool TrySameValueExist(string fieldName, object fieldValue, string key);
bool TryEntity(ISpecification<E> selectSpec);
int GetCount();
int GetCount(ISpecification<E> selectSpec);
}
}
|
By viewing downloads associated with this article you agree to the Terms of use and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.