Mineplex2018-withcommit/Website/LOC.Website.Common/Models/NautilusRepositoryFactory.cs

23 lines
616 B
C#
Raw Permalink Normal View History

2013-08-27 17:14:08 +02:00
namespace LOC.Website.Common.Data
{
using Contexts;
using Core.Data;
using StructureMap;
[PluginFamily(IsSingleton = true, Scope = InstanceScope.Singleton)]
public class NautilusRepositoryFactory : INautilusRepositoryFactory
{
private readonly IRepositoryFactory _repositoryFactory;
public NautilusRepositoryFactory(IRepositoryFactory repositoryFactory)
{
_repositoryFactory = repositoryFactory;
}
public IRepository CreateRepository()
{
return _repositoryFactory.CreateRepository<LocContext>();
}
}
}