public async Task <WrapgateApp> GetApp(string accessToken) { var appid = _acTokenManager.ValidateAccessToken(accessToken); var appLocal = await _dbContext.WrapApps.SingleOrDefaultAsync(t => t.AppId == appid); if (appLocal == null) { appLocal = new WrapgateApp { AppId = appid }; await _dbContext.WrapApps.AddAsync(appLocal); await _dbContext.SaveChangesAsync(); } return(appLocal); }
public Task DeleteRecord(WrapRecord record) { _table.Remove(record); return(_dbContext.SaveChangesAsync()); }