/// <summary> /// Update a registration. /// </summary> public Registration UpdateRegistration(Registration registration, RegistrationType type, DateTime timestamp, string name) { try { return Registration.UpdateRegistration(registration, type, timestamp, name); } catch (Exception ex) { this.logger.Error(ex); throw; } }
/// <summary> /// Update a registration. /// </summary> public static Registration UpdateRegistration(Registration registration, RegistrationType type, DateTime timestamp, string name) { registration.RegistrationType = type; registration.RegistrationTypeId = type.Id; registration.Name = name; registration.Updated = timestamp; return registration; }
/// <summary> /// Add registration to db set. /// </summary> public Registration AddRegistrationToDbSet(RegistrationType type, DateTime timestamp, string name, int originalWriteEventId) { try { var registration = Registration.CreateRegistration(type, timestamp, name, originalWriteEventId); this.readContext.Registrations.Add(registration); return registration; } catch (Exception ex) { this.logger.Error(ex); throw; } }
/// <summary> /// Create a registration object. /// </summary> public static Registration CreateRegistration(RegistrationType type, DateTime timestamp, string name, int originalWriteEventId) { return new Registration { RegistrationTypeId = type.Id, RegistrationType = type, Created = timestamp, Updated = timestamp, OriginalWriteEventId = originalWriteEventId, Name = name }; }