24 lines
572 B
C#
24 lines
572 B
C#
|
using Chatbot.Api.Domain.Data.DbContexts;
|
|||
|
using Chatbot.Api.Domain.Entities;
|
|||
|
using Chatbot.Api.Domain.Repositories;
|
|||
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace Chatbot.Api.Domain.Data.Repositories
|
|||
|
{
|
|||
|
class BotRepository : IBotRepository
|
|||
|
{
|
|||
|
private readonly BotDbContext _dbContext;
|
|||
|
|
|||
|
public BotRepository(BotDbContext dbContext)
|
|||
|
{
|
|||
|
_dbContext = dbContext;
|
|||
|
}
|
|||
|
|
|||
|
public async Task<Bot[]> GetBots()
|
|||
|
{
|
|||
|
return await _dbContext.Bots.ToArrayAsync();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|