public async Task AddSyncAction(string userId, string actionId, DateTimeOffset syncTime) { await deviceSynchronizationContext.AddAsync(new StoredSyncAction() { Id = Guid.NewGuid().ToString(), UserId = userId, ActionId = actionId, Done = false, RequestedFor = syncTime.UtcDateTime }); await deviceSynchronizationContext.SaveChangesAsync(); }
public async Task CreateAsync(string userId, string deviceId) { await _deviceSynchronizationContext.Devices.AddAsync(new StoredDevice() { Id = deviceId, OwnerId = userId }); await _deviceSynchronizationContext.SaveChangesAsync(); }