Related Models: Message.cs
Related Interfaces:
IMessageService.cs
Fields
Constructor
Properties
MessageService does not have any properties.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Handles logic related to the Message model.
IMessageService.cs
| Field Name | Type | Description |
|---|---|---|
_dbContextFactory | IDbContextFactory<NumaContext> | DbContextFactory for instantiating instances of NumaContext on-demand |
public MessageService( IDbContextFactory<NumaContext> dbContextFactory )
{
_dbContextFactory = dbContextFactory ?? throw new ArgumentNullException( nameof( dbContextFactory ) );
}
MessageService does not have any properties.
| Method Name | Description | Parameters | Return Type |
|---|---|---|---|
GetMessagesByConversationIdAsync | Gets a list of messages for a conversation in ascending order by their CreatedDatetime | string | Task<List<Message>> |
AddMessageAsync | Adds a message to the Cosmos DB | Message | Task |
using Numa.Models;
namespace Numa.Interfaces
{
public interface IMessageService
{
Task<List<Message>> GetMessagesByConversationIdAsync( string conversationId );
Task AddMessageAsync(Message newMessage);
}
}
