Think i've finished the ui now too !wip needs testing

This commit is contained in:
Jamie 2018-03-22 13:00:25 +00:00
parent 1528cdfc03
commit b99a5a668b
11 changed files with 46 additions and 25 deletions

View file

@ -10,8 +10,8 @@ namespace Ombi.Store.Repository
public interface INotificationTemplatesRepository : IDisposable
{
IQueryable<NotificationTemplates> All();
Task<IEnumerable<NotificationTemplates>> GetAllTemplates();
Task<IEnumerable<NotificationTemplates>> GetAllTemplates(NotificationAgent agent);
IQueryable<NotificationTemplates> GetAllTemplates();
IQueryable<NotificationTemplates> GetAllTemplates(NotificationAgent agent);
Task<NotificationTemplates> Insert(NotificationTemplates entity);
Task Update(NotificationTemplates template);
Task UpdateRange(IEnumerable<NotificationTemplates> template);

View file

@ -23,14 +23,14 @@ namespace Ombi.Store.Repository
return Db.NotificationTemplates.AsQueryable();
}
public async Task<IEnumerable<NotificationTemplates>> GetAllTemplates()
public IQueryable<NotificationTemplates> GetAllTemplates()
{
return await Db.NotificationTemplates.ToListAsync();
return Db.NotificationTemplates;
}
public async Task<IEnumerable<NotificationTemplates>> GetAllTemplates(NotificationAgent agent)
public IQueryable<NotificationTemplates> GetAllTemplates(NotificationAgent agent)
{
return await Db.NotificationTemplates.Where(x => x.Agent == agent).ToListAsync();
return Db.NotificationTemplates.Where(x => x.Agent == agent);
}
public async Task<NotificationTemplates> GetTemplate(NotificationAgent agent, NotificationType type)