2013-02-17 01:52:40 +00:00
|
|
|
|
using NzbDrone.Core.Datastore;
|
2013-02-04 04:18:59 +00:00
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.RootFolders
|
|
|
|
|
{
|
2013-02-05 04:07:07 +00:00
|
|
|
|
public interface IRootFolderRepository : IBasicRepository<RootFolder>
|
2013-02-04 06:27:58 +00:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//This way we only need to implement none_custom methods for repos, like custom queries etc... rest is done automagically.
|
2013-02-05 04:07:07 +00:00
|
|
|
|
public class RootFolderRepository : BasicRepository<RootFolder>, IRootFolderRepository
|
2013-02-04 06:27:58 +00:00
|
|
|
|
{
|
2013-02-17 01:52:40 +00:00
|
|
|
|
public RootFolderRepository(IObjectDatabase objectDatabase)
|
|
|
|
|
: base(objectDatabase)
|
2013-02-04 06:27:58 +00:00
|
|
|
|
{
|
2013-02-08 08:05:43 +00:00
|
|
|
|
|
2013-02-04 04:18:59 +00:00
|
|
|
|
}
|
|
|
|
|
|
2013-02-08 08:05:43 +00:00
|
|
|
|
public RootFolder Add(RootFolder rootFolder)
|
|
|
|
|
{
|
2013-02-17 01:52:40 +00:00
|
|
|
|
return ObjectDatabase.Insert(rootFolder);
|
2013-02-08 08:05:43 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2013-02-04 04:18:59 +00:00
|
|
|
|
}
|