namespace Kysect.BotFramework.Data.Entities
{
    public class TelegramSenderInfoEntity : SenderInfoEntity
    {
        public static TelegramSenderInfoEntity GetOrCreate(TelegramSenderInfo senderInfo, BotFrameworkDbContext dbContext)
        {
            var senderInfoEntity = dbContext.TelegramSenderInfos.FirstOrDefault(
                si => 
                si.ChatId == senderInfo.ChatId