Created endpoints to managed messages
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using Ardalis.Specification;
|
||||
using BeReadyBackend.Models;
|
||||
|
||||
namespace BeReadyBackend.Specifications.Messages;
|
||||
|
||||
public class GetMessageByGroupIdSpec : Specification<Message>
|
||||
{
|
||||
public GetMessageByGroupIdSpec(int groupId)
|
||||
{
|
||||
Query
|
||||
.Where(x => x.GroupId == groupId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Ardalis.Specification;
|
||||
using BeReadyBackend.Models;
|
||||
|
||||
namespace BeReadyBackend.Specifications.Messages;
|
||||
|
||||
public class GetMessageByIdSpec : SingleResultSpecification<Message>
|
||||
{
|
||||
public GetMessageByIdSpec(int id)
|
||||
{
|
||||
Query
|
||||
.Where(x => x.Id == id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user