Skip to main content
Namespace: Numa.Services
Related Models: Citation.cs
Related Interfaces: ICitationService.cs

Fields

Field NameTypeDescription
_dbContextFactoryIDbContextFactory<NumaContext>DbContextFactory for instantiating instances of NumaContext on-demand

Constructor

public CitationService( IDbContextFactory<NumaContext> dbContextFactory )
{
    _dbContextFactory = dbContextFactory ?? throw new ArgumentNullException( nameof( dbContextFactory ) );
}

Properties

CitationService does not have any properties.

Methods

Method NameDescriptionParametersReturn Type
AddNewCitationsAsyncAdds multiple citations to the Cosmos DBList<Citation>Task
GetCitationsByConversdationIdAsyncGets the citations associated with each Message in a Conversationstring,List<Message>Task<Dictionary<string, List<Citation>>>

ICitationService.cs

using Numa.Models;

namespace Numa.Interfaces
{
    public interface ICitationService
    {
        Task AddNewCitationsAsync( List<Citation> citations );
        Task<Dictionary<string, List<Citation>>> GetCitationsByConversdationIdAsync( string conversationId, List<Message> messages );
    }
}