This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| namespace EFRepository.Infrastructure | |
| { | |
| [Serializable] | |
| public class UnitOfWorkException : Exception | |
| { | |
| public override string Message | |
| { | |
| get |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| namespace EFRepository.Infrastructure | |
| { | |
| /// <summary> | |
| /// The Interface for implementing a UnitOfWork in the Repository | |
| /// </summary> | |
| public interface IUnitOfWork : IDisposable | |
| { | |
| void Commit(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Linq; | |
| namespace EFRepository.Infrastructure | |
| { | |
| /// <summary> | |
| /// Generic interface for the Repository. | |
| /// </summary> | |
| /// <typeparam name="T">EntityType T</typeparam> | |
| public interface IRepository<T> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Data.Entity; | |
| namespace EFRepository.Infrastructure | |
| { | |
| /// <summary> | |
| /// Represents an IUnitOfWork for Entity Framework | |
| /// </summary> | |
| public class EFUnitOfWork : IUnitOfWork | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface IRepository<T> where T: class | |
| { | |
| void Add( T Entity); | |
| void Delete( T Entity); | |
| void Update ( T Entity); | |
| IQueryable<T> GetAll<T>(); | |
| //some more methods | |
| } | |
| public interface IDatabaseFactory : IDisposable |
NewerOlder