public TheProjectsController(ChatBotContext ctx, ILogger <TheProjectsController> logger, IPatternsRepository patternRepo, IMapper mapper) { _dbContext = ctx; _logger = logger; _patternRepo = patternRepo; _mapper = mapper; }
public GreetingsController(ChatBotContext dbContext, ILogger <GreetingsController> logger, IGreetingsRepository greetingsRepo, IMapper mapper) { _dbContext = dbContext; _logger = logger; _greetingsRepo = greetingsRepo; _mapper = mapper; }
public ChatBotUnitOfWork(string connectionString, TimeSpan span, int spansCount) { _context = new ChatBotContext(connectionString); CommonUsersRepository = new UsersRepository(_context); RegistredUsersRepository = new RegistratedUsersRepository(_context); MessagesRepository = new MessagesRepository(_context, spansCount, span); OperatorsRepository = new OperatorsRepository(_context); }
public DefaultBotResponsesController(ChatBotContext ctx, IDefaultBotResponsesRepository defRespRepo, IMapper mapper, IValidationHelperRepository validationRepo) { _dbContext = ctx; _defRespRepo = defRespRepo; _mapper = mapper; _validationRepo = validationRepo; }
public ContextWrappersController(ChatBotContext ctx, ILogger <ContextWrappersController> logger, IPatternsRepository patternRepo, IMapper mapper, IValidationHelperRepository validationRepo) { _dbContext = ctx; _logger = logger; _patternRepo = patternRepo; _mapper = mapper; _validationRepo = validationRepo; }
public ChatBotController( IAWSLexService awsLexService, IEmailSender emailSender, IStackDriverLogger stackDriverLogger, ChatBotContext context) { _awsLexService = awsLexService; _emailSender = emailSender; _stackDriverLogger = stackDriverLogger; _context = context; }
public ActionResult GetAllQuestion() { try { ChatBotContext getAllQuest = new ChatBotContext(); var qlist = getAllQuest.ChatBot.Where(e => e.IsHeader == 0).ToList(); return(Json(new { status = true, data = qlist })); } catch (Exception ex) { return(Json(new { status = false, data = "" })); } }
public void DeleteQuestions() { try { ChatBotContext getAllQuest = new ChatBotContext(); getAllQuest.Database.ExecuteSqlCommand("TRUNCATE TABLE Chatbot"); Response.Redirect("Index"); } catch (Exception ex) { //return Json(new { status = false, data = "" }); } }
// // GET: /Question/ public ActionResult Index() { ViewModel header = new ViewModel(); ChatBotContext db = new ChatBotContext(); if (db.ChatBot.Where(e => e.IsHeader == 1).ToList().Count == 0) { header.headerinfo = ""; } else { header.headerinfo = db.ChatBot.Where(e => e.IsHeader == 1).FirstOrDefault().Desc; } return(View(header)); }
public ActionResult SaveQuestion(QuestionModel quesObj) { ChatBotContext db = new ChatBotContext(); chatbot c = new chatbot(); c.IsHeader = 0; c.Desc = quesObj.Question; c.ContactId = Convert.ToInt32(quesObj.QuestionContectId); c.ParentId = Convert.ToInt32(quesObj.QuestionParentId); c.LevelId = quesObj.QuestionNextLevelId; db.ChatBot.Add(c); db.SaveChanges(); return(Json(new { status = "true" })); }
public ActionResult AddHeader(string header) { try { chatbot c = new chatbot(); c.Desc = header; c.IsHeader = 1; c.LevelId = 0; c.ParentId = 0; c.ContactId = 0; ChatBotContext addHeader = new ChatBotContext(); addHeader.ChatBot.Add(c); addHeader.SaveChanges(); return(Json(new { status = true })); } catch (Exception ex) { return(Json(new { status = false, data = "" })); } }
public ActionResult ShowAllQuestions() { ViewModel header = new ViewModel(); using (ChatBotContext cb = new ChatBotContext()) { if (cb.ContactInfromation.ToList().Count > 0) { header.ContactList = (from c in cb.ContactInfromation select new ContectLists { Address = c.Address, email = c.email, Id = c.id, name = c.name, phoneNumber = c.phoneNumber, website = c.website }).ToList(); } if (cb.ChatBot.ToList().Count > 0) { header.QuestionList = (from c in cb.ChatBot select new QuestionList { ContactId = c.ContactId, Desc = c.Desc, IsHeader = c.IsHeader, LevelId = c.LevelId, ParentId = c.ParentId, QID = c.QID }).ToList(); } return(View(header)); } }
public NoticesRepository(ChatBotContext context) { _context = context; }
public RespostasController(ChatBotContext context) { _context = context; }
public ChatItemsController(ChatBotContext context) { _context = context; }
public UserController(ChatBotContext context) { _context = context; }
public MailListsController(ChatBotContext context) { _context = context; }
public RoleRepository(ChatBotContext context) { _context = context; }
public AuthController(IAuthRepository repo, IConfiguration config, ChatBotContext ctx) { _config = config; _repo = repo; _dbContext = ctx; }
internal UsersRepository(ChatBotContext context) { _context = context; }
public QuestionAnswerRepository(ChatBotContext context) { _context = context; }
public AuthRepository(ChatBotContext context) { _context = context; }
internal OperatorsRepository(ChatBotContext context) { _context = context; }
public EtapasController(ChatBotContext context) { _context = context; }
public TrelloCardController(ChatBotContext context) { _context = context; }
public Seed(ChatBotContext context, IConfiguration config) { _context = context; _config = config; }
public DefaultBotResponsesRepository(ChatBotContext dbContext, ILogger <DefaultBotResponsesRepository> logger) { _dbContext = dbContext; _logger = logger; }
internal RegistratedUsersRepository(ChatBotContext context) { _context = context; }
public UsersController(ChatBotContext context, IMapper mapper) { _mapper = mapper; _context = context; }
public ValidationHelperRepository(ChatBotContext chatBotContext) { _chatBotContext = chatBotContext; }