...
This commit is contained in:
20
Back/Services/servNotification.cs
Normal file
20
Back/Services/servNotification.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Back.Data.Contracts;
|
||||
using Back.Data.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Back.Services
|
||||
{
|
||||
public class servNotification
|
||||
{
|
||||
private readonly IAsyncRepository<Notification> _NotificationRepo;
|
||||
|
||||
public servNotification(IAsyncRepository<Notification> NotificationRepo)
|
||||
{
|
||||
_NotificationRepo = NotificationRepo;
|
||||
}
|
||||
public async Task<List<Notification>> GetNotifications()
|
||||
{
|
||||
return await _NotificationRepo.Get(w=>w.Status).ToListAsync();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user