public async Task <IActionResult> Add(string Key, string Account) { CaptchaKeys captcha = new CaptchaKeys(Key, Account); await _captchaService.Add(captcha); return(await BuildPartialView()); }
public async Task Delete(string Id) { CaptchaKeys captcha = await repositoryCaptcha.FindAsync(c => c.Id == Id); repositoryCaptcha.Remove(captcha); await repositoryCaptcha.SaveChangesAsync(); }
public async Task <CaptchaKeys> Update2CaptchaKey(string Id, string Key) { CaptchaKeys captcha = await repositoryCaptcha.FindAsync(c => c.Id == Id); captcha.Key = Key; await repositoryCaptcha.UpdateAsync(captcha, captcha.Id); await repositoryCaptcha.SaveChangesAsync(); return(captcha); }
public async Task Add(CaptchaKeys captcha) { await repositoryCaptcha.AddAsync(captcha); await repositoryCaptcha.SaveChangesAsync(); }