private bool Register(string registerId, string deviceId) { RegistrationDevice registration = new RegistrationDevice(); registration.Date = GlobalWebData.ToUniversalTime(); registration.RegistrationId = registerId; registration.DeviceId = deviceId; earthquakeRepository.DbContext.RegistrationDevices.Add(registration); earthquakeRepository.Save(); return(true); }
public void SaveLog(String log, String deviceId) { DeviceLog newlog = new DeviceLog(); newlog.DeviceId = deviceId; newlog.Date = GlobalWebData.ToUniversalTime(); newlog.Log = log; earthquakeRepository.DbContext.DevicesLogs.Add(newlog); earthquakeRepository.Save(); }