Adds the foundation for the repository implementation with abstract Repository, Unit Of Work and Cache provider.

Adding the Query object implementation.
Adds the ModelDtoMapper, which is still a WIP.
Adds the initial implementation of the IContentRepository with dependencies.
This commit is contained in:
Morten@Thinkpad-X220
2012-10-04 13:44:02 -02:00
parent 75e11b2ba8
commit 145cddbcb6
18 changed files with 1783 additions and 7 deletions

View File

@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using Umbraco.Core.Models.EntityBase;
namespace Umbraco.Core.Persistence.Caching
{
/// <summary>
/// Defines the implementation of a Cache Provider intented to back a repository
/// </summary>
internal interface IRepositoryCacheProvider
{
/// <summary>
/// Gets an Entity from the cache by Type and Id
/// </summary>
/// <param name="type"></param>
/// <param name="id"></param>
/// <returns></returns>
IEntity GetById(Type type, Guid id);
/// <summary>
/// Gets an Entity from the cache by Type and Ids
/// </summary>
/// <param name="type"></param>
/// <param name="ids"></param>
/// <returns></returns>
IEnumerable<IEntity> GetByIds(Type type, List<Guid> ids);
/// <summary>
/// Gets all Entities of specified type
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
IEnumerable<IEntity> GetAllByType(Type type);
/// <summary>
/// Saves the Entity
/// </summary>
/// <param name="type"></param>
/// <param name="entity"></param>
void Save(Type type, IEntity entity);
/// <summary>
/// Deletes the Entity from the cache
/// </summary>
/// <param name="type"></param>
/// <param name="entity"></param>
void Delete(Type type, IEntity entity);
}
}